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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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 Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

65 views 0 5
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