Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Auto populate custom field (Team) when user is assigned

Ashish Virulkar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 27, 2025

Hi Team,

I want to define automation rule for my project issues. When Assignee is from list of people then team field in Issue should be autopopulated with team name. I dont know how to create multiple teams.However,if there is option to create team names based on users in assignee field,I can go for that approach.

I have also used "Teams" section of jira and teams are created and it shows as contributing teams under project but Jira has limitation to show those teams for issues summary in filter hence cant go for this approach.

Please advise how can I setup automation rule for users and related team name.

Thanks in advance for your help!!

 

1 answer

3 votes
Bill Sheboy
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.
November 27, 2025

Hi @Ashish Virulkar 

Short answer: what you describe is not possible.

 

Using automation rules, the Team field may be set using the id value and JSON, but not the name.  For example, with an example custom field id and team, that could be this in the Edit Work Item action:

{
"fields": {
"customfield_12345": "789abc123"
}
}

 

However, I do not believe there is a way to find the Team for a specific user.  Instead, the REST API endpoints only support the opposite: finding the users assigned to a specific Team.

There is an open suggestion to add an endpoint to get the Team(s) for a user, and you may watch / vote for it to see progress: https://jira.atlassian.com/browse/JRACLOUD-83728

A messy workaround would be to duplicate the assignment lists (i.e., users and teams) in a rule, such as in Lookup Tables or Created Variables.  But, that would be a brittle solution and quickly get out of synch with your assignments of people to Teams.

 

Kind regards,
Bill

Ashish Virulkar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 28, 2025

 

HI @Bill Sheboy  Thanks for your response. I know its not possible as team id will be not constant for every team and api may be troublesome to achieve this.

However, I tried another approach. I have created team names and added them under custom field Team. 
I have created automation rule with work item condition like if assignee is any one from mentioned users then added condition to assign team field as "ABC" (ABC is team name added in team select field).. But as I have multiple teams based on various users,I dont know how to handle multiple conditions in rule. Please find attached snap of my rule.I have added different if else conditions but rule runs only for 1st condition of workitem and not for ifelse block.. Can you please advise how to handle multiple conditions in rule.

Requirement is...if Assignee is person1,person2,person3 then edit work item team field as "ABC"
if Assignee is person4,person5,person6 then edit work item team field as "XYZ"
if Assignee is person7,person8,person9 then edit work item team field as "EFG"

 

 

1.jpg

Bill Sheboy
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.
November 29, 2025

Hi @Ashish Virulkar 

First thing: there are multiple things in Jira named "Team" and there is an existing built-in, custom field with that name.  Did you create a new custom field also named "Team"?  If so, and to avoid problems in Jira features, including automation, I recommend not using the same field name and instead pick a new field name.  Even though you could use the custom field ID to reduce rule confusion, people will be confused when using the field.

 

Next, the condition on the trigger makes no sense to me as it appears to only test 2 possible users, but you describe / show testing multiple other assignees and reporters.  Please carefully review your rule logic to confirm it matches your actual scenario for users involved.

 

Next, your rule uses the Edit Work Item action and then uses later conditions on the item's fields.  When an edit happens in a rule, that does not update the in-memory copy the rule stores for the work item fields. 

When you want updates to be visible later in the rule, add the Re-fetch Work Item Data action to reload the trigger work item data.  For example:

  • trigger: work item assigned
  • user condition: assignee is...
  • action: edit work item...
  • action: re-fetch work item data
  • if / else block...

 

Next, you have nested the IF / ELSE blocks, which is not what you described.  Instead, use one single IF / ELSE block and then add more ELSE / IF ones in the same block.  For example:

  • trigger: work item assigned
  • user condition: assignee is...
  • action: edit work item...
  • action: re-fetch work item data
  • if / else block
    • user condition: assignee is Person A or Person B
    • action: edit work item, to set the "team"
  • else / if:
    • user condition: assignee is Person C or Person D
    • action: edit work item, to set the "team"
  • ...

 

Finally, as you appear to be hard-coding the relationships between people and teams in the rule, a simpler and easier to maintain rule could use a Lookup Table to map the users to the team without using any rule condition logic: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-lookup-table

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events