Help with automation condition

Gui Ávila December 9, 2020

Hi!

Please see this screenshot of an automation I'm creating.

I only want to fire the action if the linked issues belongs to a specific project. How can I do that condition?

In other words, what the automation should do is: if any issue transitions to status X (issues from all projects), add a comment to linked issues if these linked issues belongs to project Y.

Thanks a lot!

Gui.

4 answers

1 accepted

0 votes
Answer accepted
Stephan Shere
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 9, 2020

Gui,

This should be working as long as your Linked Issues are corresponding to the correct linking type.

Maybe I am misunderstanding, are you trying to specifically filter the linked issues to a specific project, or just make sure that he projects link?

Is this what you're looking to accomplish?

image.pngWe created a linked issue from Service Desk into Jira and when the Jira issue was transitioned to done it created a comment on the Service Desk project.

 

 

2 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 9, 2020

Hi @Gui Ávila 

Is this a global (or multiple project) rule?  If so, I suspect you can just use the branch over the linked issues to check them and add the comment.

Best regards,

Bill

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 10, 2020

Hi @Gui Ávila 

You noted the commenting works and is made on every issue instead of just some of them. 

If the link types by project are different you could filter on those.  If not...Your next approach, although complicated, is to only add the comment for the linked issues of interest by parsing them out the links as strings, and then using JQL:

  • Remove the original branch on links, as it is not helping in this scenario
  • Capture the links into created variables, such as {{myLinks}}.  Depending on how you linked, these will be {{issue.issuelinks.inwardIssue}} and/or {{issue.issuelinks.outwardIssue}} 
  • Use string functions to extract the target project links, perhaps using RegEx
  • With this new comma-separated values (CSV) list of links, you use a new branch on JQL: key IN ( {{myLinks}} )
  • Now you may iterate over the desired issues to add the comments
Like Stephan Shere likes this
0 votes
Gui Ávila December 10, 2020

@Stephan Shere @Bill Sheboy , problem solved. It worked now. Thanks!

Stephan Shere
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 10, 2020

Great to hear! Do you have a solution that you can share?

Gui Ávila December 10, 2020

@Stephan Shere Only a simple filter: https://share.getcloudapp.com/GGu26Kln

I thought that would filter the trigger issue and not the linked issues.

But it worked fine :)

Like Stephan Shere likes this
Stephan Shere
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 10, 2020

Not sure how I missed that!

Now I know for the future, so I'm very appreciative of the knowledge.

Like Gui Ávila likes this
0 votes
Gui Ávila December 10, 2020

Hello @Stephan Shere and @Bill Sheboy . Thanks for your help!

The automation already works fine, but the comment is made on every linked issues. What I want to do is to make the comment only if the linked issue belongs to a specific project.

I tried to create a condition, but if I choose "issue belongs to project X", Jira understand that is the issue that triggers the rule and not the linked issues.

Thanks!

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