Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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

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!

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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you