How do I check if tickets are in the same project (or 2 different projects) in an automation?

Max Boerma December 20, 2021

I've got an automation set up that flags tickets when they've become blocked by another ticket. I want to set up an automation that unflags them when they've been put in a certain status. 

I'm using different projects and want them to behave different. I want to set up 2 automations or have the effect thereof. 

1) When the blocking and blocked by ticket are in the same project I want to unflag them when the blocking ticket has come in the status: "In Review".

2) When the blocking and blocked by ticket are in different projects I want to unflag them when they're in the status: "Resolved" 

I'm having some problems with setting it up. I can't find a way to do the same or different project bit. How can I fix that?  

1 answer

0 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 Leaders.
December 20, 2021

Hi @Max Boerma 

Please try an advanced compare condition and test with the smart value {{issue.project}}

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/

Kind regards,
Bill

Max Boerma December 21, 2021

Hi @Bill Sheboy

 

Thanks for the help! I've been trying to get it to work but can't figure out how (I don't know what the second value should be. 

Schermafbeelding 2021-12-21 om 15.12.38.png

I think I'm doing it wrong with the second value right? I've tried {{destinationissue.project}}. I can't find a way to compare it to the project of the linked issue. 

Thanks!

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 Leaders.
December 21, 2021

Hi, Max.  Thanks for adding more information!

First thing: I recommend implementing this one-rule, and one-status at a time.  Once you have it working you can decided if/how the rules can be merged.

Next, some follow-up questions:

  1. How many issues are linked for blocking: one-to-one, one-to-many, or many-to-many?
  2. If one-to-many or many-to-many, are issues linked in chains of A---(blocks)-->B---(blocks)-->C

If you have anything other than one-to-one blocking links, you could get into a situation where it is not possible to determine "flagged" or "not flagged".

If you only have one-to-one links, rather than using branches on links you could use a branch on JQL to set a created variable based on the linked-issues information, and then use that to decide about flagging.  The JQL to get at the linked issue would be:

issue IN linkedIssues({{triggerIssue.key}}, "blocks")

Suggest an answer

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

Atlassian Community Events