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,298,376
Community Members
 
Community Events
165
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

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

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. 

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
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

181 views 1 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you