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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.