Is there a way to conditionally set the status in an automation?

Nicole Baratta
Contributor
February 17, 2022

I have an automation that creates a new issue when certain criteria are met.  In the new issue, I'd like to set the status to Backlog if the trigger issue is in Backlog status, otherwise, I want the status to be New.  Is there a way to do this? Maybe in the JSON/advanced options? 

3 answers

1 accepted

0 votes
Answer accepted
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2022

HI @Nicole Baratta ,

  • What does your workflow in the project look like?
  • what is the default status for newly created issues?

Could you please provide a screenshot of your automation rule for better understanding and analyzing a fitting solution?

 

Best
Stefan

Nicole Baratta
Contributor
February 17, 2022

So, the workflow for the project that triggers the automation is:

Screen Shot 2022-02-17 at 12.30.49 PM.png

The workflow in the project where the new issue is being created it:

Screen Shot 2022-02-17 at 12.31.11 PM.png

And the automation:

Screen Shot 2022-02-17 at 12.33.31 PM.png

So, the trigger issue workflow starts with Backlog and the created issue workflow starts with New.  But if the trigger issue is in Backlog I want the status of the created issue to be Backlog too.

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2022

I partially agree with @Fernando Eugênio da Silva and @Aditya Sastry .

The if/else might be your choice. I see 2 ways here:

  • create the issue upfront and pack the transition into the if clause 
  • put the create as well as transition action into if clause and just the create action in the else clause as the create-status in this case is automatically "New" (or vice versa)

 

I revised --> see next reply

 

 

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2022

I need to revise my last message: you could solve use with only using an if

  • create issue --> will by default be in status "New"
  • if trigger issue is in backlog
  • branch recently created issue 
    • action transition to backlog

 

Hope all the inputs could help. Happy automating ;)

In case of any further questions: Just let us know.

 

Best
Stefan

Like Nicole Baratta likes this
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 21, 2022

Hi @Nicole Baratta ,

If the solution works please consider to accept the answer so that this question is marked as solved.

Best
Stefan

Nicole Baratta
Contributor
February 21, 2022

@Stefan Salzl this sounds the most promising, but it's not working. I wonder if it's cause the branch applies to the trigger project and not the target project.

Screen Shot 2022-02-21 at 7.47.06 AM.png

 

The audit log says it didn't find anything that matched. But the trigger issue was in the Backlog.

 

Screen Shot 2022-02-21 at 7.47.00 AM.png

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 21, 2022

@Nicole Baratta 

Could you please add the full audit log ouput?

How is the rule configured in rule details? Keep in mind that if the rule affects or is affected by more than 1 projects the rule need to be configured as multi project or global rule.

Best
Stefan

Nicole Baratta
Contributor
February 21, 2022

That's exactly what I was missing.  This rule is project-specific, so I need to make it multi-project or global. Thank you so much!!! 

Like Stefan Salzl likes this
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 21, 2022

You are welcome. Happy that it works ;)

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 21, 2022

Please also consider this answer as accepted as there was the solution within it. That will make it more traceable for users in the future if they are facing similar problems and searching for a solution (easier to see which answer offers an accepted solution).

Best
Stefan

0 votes
Aditya Sastry
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.
February 17, 2022

@Nicole Baratta This is how I have configured the if else in my automation and it works.

Untitled.png

0 votes
Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2022

@Nicole Baratta 

Wouldn't it be the case that you use IF/ELSE conditions in Jira Automation??

I don't fully understand your situation, but maybe using IF/ELSE will help.

If it doesn't work, can you come back with more details?

Nicole Baratta
Contributor
February 17, 2022

My answer above to Stefan might clear it up.  But your idea might work, I could just repeat the automation and have the status different in the IF than in the ELSE.

Suggest an answer

Log in or Sign up to answer