How can I apply IF statements to custom fields

Use Case: I have a custom field called Team. If the Assignee is John Doe, I want to place a value (the team John Smith is on) in the Team custom field. I have multiple users that can be Assignees, each on different teams. I want to make sure that if one assignee is selected the appropriate team name will auto-display. 

Team is a Group Picker custom field.

Ex: If Assignee = "John Doe" then Team = "Red Team" or If Assignee = "Jane Doe" then Team = "Blue Team"

1 answer

Hi Marc,

the easiest way that I can think of is if you use Script Runner is to run a groovy script as listener to Issue Assigned system event and in the script to update the Team field based on the team membership.

One potential issues might be if a user is member of two teams/groups.


Peter T

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

43 views 0 3
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you