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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

54 views 1 0
Join discussion

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