Forums

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

When in my Automation would I add an if/then to add a label, depending on issue type

Lauren Church November 30, 2023

Hi! Thanks in advance for noodling this with me.

I'm doing a basic JSM -> Software Project automation, where tickets come in via the JSM and get handed off to my software project. I have two types of issues being funneled this way -  bugs and stories.

I want to add a label to the new Software Project ticket depending on the issue type.

Right now I have -

When: A new issue is created

Then: Create a new same issue type in (Software Project)

And: Permanently remove this issue

Since the label would be on the newly created ticket... but requires an if->then looking at the issue type, I'm wondering if I need to craft something in JSON? Blarg.

Thanks in advance, Jira nation.

1 answer

1 vote
Michel Neeser
Community Champion
November 30, 2023

Hi @Lauren Church

Something like this should do the trick here:

Automation_-_Jira.png

Please note that it isn't possible to have an IF/ELSE inside a branch, so the workaround with two branches is necessary.

Besides that, please be careful when deleting tickets. If you delete the ticket in your JSM project, it is gone for good and not accessible anymore for agents and customers. Maybe it is a better idea to just link the newly created ticket to the JSM ticket instead of deleting it?

Hope this helps!

Lauren Church December 1, 2023

That does seem super helpful! I started to try this out on my automation, but then ran into this, "Only issues from the above projects will be considered. You can change this restriction in the 'Rule details' section."

I think I understand this - right now this rule is only set to affect the project this ticket is in. If I added the project the tickets move to, I would be allowing only this automation to edit issues from both projects.

It's one of those things that sounds very straight forward but I just get nervous about making any kind of change to that software project. I can see how using this to add labels necessitates this. But yeah. Just wanting to make sure I ponder all the angles here.

Michel Neeser
Community Champion
December 2, 2023

@Lauren Church If you expand the rule to the other project, this other project will only be affected by the actions defined in your rule. No other actions are executed in the background, so everything is under your control.

Furthermore, Atlassian recently changed how the automation usage is calculated. Previously, it was more difficult to expand an automation rule to multiple projects without hitting a certain limit. Now it no longer matters how many projects are affected by an automation rule, the usage limits are always calculated the same way. You can find more information on this here.

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