Hi all,
I need to solve an issue, where I 'd like to have a single choice select list custom field with values (user names and user ID's) where the chosen option would be parsed based on user name or ID, validated against user management from crowd/LDAP), and the result (user) would populate a single choice user picker custom field, which can be later used e.g. for a validation on a transition.
Use case: Employee picks an "approver" from a list of people (single choice select list). This option is parsed, validated and matched to an actual JIRA user. This parsed JIRA user (e.g. approver), is then copied into another custom field (single choice user picker).
There are three scenarios:
1: Usage of an post function on any transition (or create screen) screen with the single choice custom field.
2: Using a Listener for a issue field update, when the single choice select list changes the value, then the approver changes as well.
3: Scenario 1 and 2 combined. That the single choice custom field can be changed on edit screen, but can be used on a transition screen as well (based on demand of the management or project/process owner)
Idea behind this request: I don't want people to start typing any name in a user picker field, but I want them to have all the possible "approvers" visible, listed in one select list.
Has anyone of you experience with something like this? Anyone who could advice me if I have to use a listener or it can be done in any other way?
Hi @Peter Pesta, you can do it on an easier way, use Single user-picker custom field , it is a custom field by Jira itself.
Hi @Alvin. Thank you very much.
The reason why I want to use the select list is, that I do not want users to start typing any name in the user picker field. They don't really need to know who can be set as "approver" and a select list gives them all the possible options right away.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would use a single user-picker field directly, not try to code.
In the more recent versions of Jira, you can limit the list to just the approvers by having them in group or a role in the project. Create the field as usual, then go to configure it and look at the context - you can set "rules about who to show in the list" in there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nic Brough -Adaptavist-. Thank you very much.
The reason why I want to use the select list is, that I do not want users to start typing any name in the user picker field. They don't really need to know who can be set as "approver" and a select list gives them all the possible options right away.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If they don't need to know who can be set as an approver, then I'd skip the field completely and write a short script that sets it for them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
They don't need to know who can be set (like if it's person A, B, C or D), but they have to choose one from the list.
Sometimes people change their positions and newcomers doesn't necessarily know all the "approvers". It is easier to choose one name from a list, than to look for all possible options and then choosing one. Since the "responsible for the approval" can be just one from many.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.