How can I apply IF statements to custom fields

Marc L May 25, 2016

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

0 votes
Peter T
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 25, 2016

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