...
- String (default)
- Component Picker
- Group Picker
- Issue Picker
- Project Picker
- User Picker
- Version Picker
Using PCF - Multiple Autocomplete custom field
If you go to an issue and edit this field, you will see an image like the following example:
...
If the option type you selected is "Default", the picture above will look like the following example:
Examples
Using Multiple Autocomplete custom field with SIL Data Source
Getting Users
This example gets all users existing in certain groups (in this case, "jira-users") and adds the usernames that match the search as options to the custom fields using this data source.
Code Block |
---|
function getUsers(string [] groups){ string [] users; for(string group in groups){ string [] currentGrp; currentGrp = addElement(currentGrp, group); for(string user in usersInGroups(currentGrp)){ users = addElementIfNotExist(users, usernameToUserKey(user)); } } return users; } string [] groups = {"jira-users"}; string [] users = getUsers(groups); string [] res; for (string user in users) { if (contains(user, argv["query"])) { res = addElementIfNotExist(res, user); } } return res; |
Using Multiple Autocomplete custom field with SQL Data Source
To use SQL Data Source, set the JNDI first. You can see details on the Data Source Configuration page.
...
Code Block |
---|
select user_name from cwd_user; |