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
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

4 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 Champions.
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
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 Champions.
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

 

Ashish Virulkar
November 29, 2025

Hi @Bill Sheboy Thanks for these steps.. I will try it out and let you know result.

Just to be clear about requirement. Its like below.

I am using Team field which is already enabled for my project/board.  I have added 3 teams name under this field so that these values can also appear as dropdown.

 Team field.jpg

 

In my rule, under 'Edit work item',I am selecting 'Choose fields to set' option as Team(select) and then picking that added team name in Team field i.e. ABC
After clicking next ,I am getting option of then:Add an action , If:Add a condition.

I think I am missing the steps or sequence here.

I am having total 6-7 teams and these teams are having different users related to those team.

Please advise if I should still follow your steps which you provided ealrier or is there a better and less complex approach which can solve my requirement.

My ultimate goal is to have pie chart gadget which will show No.of Issues by multiple teams. and In order to get these teams linked to issue,when someone put assignee name,team field should populate team name of that assignee.

Thanks again for your help...Looking forward to hearing from you soon...

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 Champions.
November 30, 2025

Thanks for that information, @Ashish Virulkar 

If you are using the built-in Team field, I believe automation rules can only set that with a JSON expression in the advanced edit, and not with the dropdown field in the Edit Work Item action.  This matches what I described in my first post.

And also, if the field is the built-in one, the only way to do what you describe is either a single IF / ELSE block to test for each case or using a Lookup Table to map the values.  Both will require hard-coding the ID values for the users and teams to match to them.

 

I suggest trying a simple test rule to match users to teams, and just writing values to the audit log rather than editing any work items.  When that works as you expect, add the Edit Work Item actions.

 

Ashish Virulkar
December 17, 2025

HI @Bill Sheboy    I have tried if else block but as you said, its very tedious process in automation rule and not user friendly to manage addition/deletion of user from various teams.Also,it require lot of hard coding in conditions which is not recommended.

 

The most effective solution could be enabling this “Contributing Teams” feature/capability under project setting and its linkage to Issues of project which is critical part for project summary ,planning and reporting activities.

Any idea when and how this feature will be enabled so that we can use it in gadget. Really appreciate your timely support in this matter...

 

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 Champions.
December 18, 2025

Sorry, I do not have information about when features will be released...other than what Atlassian publicly discloses in their blogs.

 

After a quick check, I did not find any REST API endpoints to get the "Contributing Teams" assigned to a project / space.  You may want to ask the support team if that exists as it could be used to populate a Dynamic Lookup Table to help.

Even with that, there is no built-in way to map the users to the teams, and they would need to be hardcoded or every single team checked using the REST API.

Suggest an answer

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

Atlassian Community Events