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.

Cheers,

Peter T

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

869 views 3 9
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