Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,796
Community Members
 
Community Events
184
Community Groups

Parsing username from single choice select list

Edited

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?

2 answers

0 votes
Alvin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 29, 2019

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. 

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 29, 2019

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.

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. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 30, 2019

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.

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.  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events