Forums

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

Jira Automation: Assign the issue's Team to be the team of the epic

Joe Zulli
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!
August 17, 2023

Hi all, I'm trying to create the following automation rule:

When a team is assigned to an Epic, assign the team to all issues under that epic as well. 

Is this possible to do? I tried the following (and many variations), but I keep getting the same error of "Error while parsing additional fields. Not valid JSON."

{
  "fields": {
    "Team": {{issue.parent.Team.asJsonObject("id")}}
  }

Any help would be greatly appreciated!

 

Thanks in advance, 

Joe 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
August 17, 2023

Hello @Joe Zulli 

What do you expect to get when you us asJsonObject? Are you expecting to get the value of the "id" attribute for the Team field? I don't think that is how the function works per the documentation.

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-json-functions/#asJsonObject-keyName-

I think the output of the asJsonObject field would instead by

{"id" : "some value"}

You might be able to use this instead:

{{issue.parent.Team.value.asJsonString}}

You might also want to use the Log action to print to the rule audit log the output of {{issue.parent.Team}}, {{issue.parent.Team.value}}, and other smart values you are trying to use.

 

This article shows the proper syntax for setting the AR Team field in an issue:

https://community.atlassian.com/t5/Jira-articles/Automation-Set-your-Advanced-Roadmaps-Team-automatically-when/ba-p/1761588

 

It looks like you may also have to reference the Team field by its custom field identifier rather than by name.

 

Disclaimer: I have not actually tested any of this out. I know there are multiple posts in the communities about using Automation to set the AR Team field. You might want to try an internet search for "jira cloud automation set team field" to find those and see if they offer relevant advice.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events