Forums

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

I'm trying to create an automation rule on JIRA based on which team an issue is assigned to

Tony Parsons June 5, 2023

When I am setting up the component, there is an option for the field called 'Teams' but I don't think it's the custom field called 'Team'. I've come to this conclusion because the teams available are team 1 and team 2 but those aren't the teams I've created.

This is the field I've selected: 

Teams1e.PNG

And these are the options it gives me: 

Team 1

Team 2

But these are the teams I have created: 

Teams2.PNG

What I am trying to achieve here is to clone issues from a project and add them to another project based on the team assigned 

I tried to use chatGPT for the Json object and this is what it gave me: 

{
"update": {
"labels": [
{
"add": "cloned"
}
],
"issuelinks": [
{
"add": {
"type": {
"name": "Cloners"
},
"outwardIssue": {
"key": "{{issue.key}}"
}
}
}
]
},
"fields": {
"project": {
"key": "{{#if (equals team 'Dev Team')}}IN{{/if}}"
}
}
}

But the Json object is returning the error:

'Error while parsing additional fields - Closing tag (if) does not match opening tag (if (equals team 'Analytics'))'

1 answer

1 accepted

2 votes
Answer accepted
Valerie Knapp
Community Champion
June 5, 2023

Hi @Tony Parsons , thanks for your question.

I have understood that you want an automation to clone an issue into the project where it will be worked on using the value from a custom field, Team.

Please take a look at this rule from the Automation library -

https://www.atlassian.com/software/jira/automation-template-library#/rule/140670

I think you are missing the IF condition, so, you have a trigger to say when to call the rule, then an evaluation of a field, in this case, Team, to then have an action to clone into this project or that project.

I hope this helps but if not, please give us your feedback and either I or someone else will try to help.

Cheers

Tony Parsons June 5, 2023

Hi Valerie. Thanks so much for your response and after looking at the guide I think that will help me. However, there is only an option for a field called 'Teams' instead of 'Team' and the options for the field 'Teams' only has 'team 1' and 'team 2' as the possible teams but these are not my teams. Is Team 1 and Team 2 the default teams or something? How do i get my teams to show as an option? 

Valerie Knapp
Community Champion
June 5, 2023

Hi @Tony Parsons , thanks for your reply. Please can you confirm that these are all company-managed projects? If they are team-managed, I don't think you will be able to create an automation based on a custom field in a team-managed project.

Tony Parsons June 5, 2023

The one is a team managed project. But the field 'Teams' is also an issue on the company managed project where the options are 'Team 1' and 'Team 2'

Valerie Knapp
Community Champion
June 5, 2023

Hi @Tony Parsons , thanks for your response. I don't think it will be possible to use an automation from a team-managed project to create in a company-managed project.

This is why you are not able to find the custom field created in the team-managed project when you are writing the rule. Custom fields created in team-managed projects only exist in that specific project. When you look up a custom field in an Automation rule, this is looking at the Jira system settings custom fields.  

Customize an issue's fields in team-managed projects | Jira Software Cloud | Atlassian Support

I think the only way to implement an automation like this is between company-managed projects. 

Tony Parsons June 5, 2023

Thanks so much for everything @Valerie Knapp . I ended up just skipping the team association field and just checked if a user from the respective team is assigned to the issue. Not exactly what I wanted but it will work for now. Thank you!

Suggest an answer

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

Atlassian Community Events