Hi,
We have a user picker SIL script configured for one of our custom fields. For one particular user, the auto-complete is not working. The SIL script is -
function getUsers(string [] groups){
string [] users;
for(string group in groups){
string [] currentGrp;
currentGrp = addElement(currentGrp, group);
for(string user in usersInRole(project, currentGrp)){
users = addElementIfNotExist(users, user);
}
}
return users;
}
string [] groups = {"Developers", "Administrators"};
string [] users;
if(isIssueContext()) {
users = getUsers(groups);
} else {
string [] projectsYouAreOn = projectsWithPermissionForUser(currentUser(), "ASSIGN_ISSUES");
for (string prj in projectsYouAreOn) {
string [] members = projectMembers(prj);
for (string member in members) {
users = addElementIfNotExist(users, member);
}
}
}
string [] res;
for (string user in users) {
if (contains(user, argv["query"])) {
res = addElementIfNotExist(res, usernameToUserKey(user));
}
}
return res;
The user whom I'm searching for and is not appearing as auto-complete is added to the Developers project role though.
Can someone please share their thoughts on this ?
Thanks in advance,
Neha
Hello,
Could you use the logPrint method to log info into the atlassian-jira.log file?
https://confluence.cprime.io/display/SIL/logPrint
You should log the res variable and see if the user is there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.