Forums

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

JIRA Automation: Trying to create rule based on the issue types linked to trigger issue

Riccardo Gentile July 29, 2024

Hi all,
I am struggling to create a JIRA automation rule (for a single project) that goes as follows:

  1. When an issue transitions from status A to status B
  2. AND if the issue of a specific issue type
  3. AND EITHER
    1. at least one linked issue is of a specific issue type,
      THEN comment on triggered issue
    2. OR at least one linked issue is of a specific linked issue type,
      THEN comment on triggered issue.

(See screenshot provided)
Unfortunately, when implementing the rule and triggering the event, no comments are created. It doesn't seem to work nor are the audit logs clear on showing what the issue is.

I've tried other options but I am not sure where I am going wrong as I am trying to identify if any linked issues are of a specific issue type and then do a certain action on the triggered issue... but I need some help on this one.24-07-29_19h43m45s.png

2 answers

1 accepted

3 votes
Answer accepted
Trudy Claspill
Community Champion
July 29, 2024

Hello @Riccardo Gentile 

Do you want the same comment created if either of the conditions is matched? Or do you want different comments?

Do you want it to make both comments if both conditions are matched? 

Can you show us the details in the IF conditions you created?

Riccardo Gentile July 29, 2024

Hi @Trudy Claspill
Answer to your questions:
I am only using the "add comment to issue" command to test if the automation rule works.
In the screenshot, I am creating different comments depending on which way the logic is directed by the automation process.
The main issue is that neither of the comments are being created (i.e. the automation doesn't get passed the IF conditions.
I will add a screenshot of each IF condition below (see added screenshots)24-07-29_22h25m35s.png24-07-29_22h26m49s.png



Trudy Claspill
Community Champion
July 29, 2024

Hello @Riccardo Gentile 

Your use of a smart value here is incorrect.

Screenshot 2024-07-29 at 3.43.34 PM.png

In the context of your rule as it currently is constructed {{issue. here refers to the issue that triggered the rule, not the linked issues.

 

In this case, the smart value you have used actually has no value.

Screenshot 2024-07-29 at 3.46.43 PM.png

 

{{lookupIssues}} has a value only when a Lookup Issues action has been used, and you have not used that action in your rule.

 

In the context of your rule and the condition you are trying to use your JQL should be simply:

issueType="Change Request"

Like Riccardo Gentile likes this
Riccardo Gentile July 30, 2024

Hi @Trudy Claspill

Thank you kindly for your assistance and your suggestion.

Unfortunately, it did not work.
I changed both parts to match the JQL you recommended (see screenshot) to see if I would get at least one of the IF conditions to react but the audit log shows no responses to the change. (see screenshots)

24-07-30_08h58m19s.png24-07-30_08h59m36s.png


Riccardo Gentile July 30, 2024

Hi @Trudy Claspill 

I am such a fool!

Your recommendation worked.
The reason it didn't seem to work initially was because I forgot to set the scope to Global (instead of just to one project) since the linked issue is from a different project.
24-07-30_09h43m39s.png

So including setting the correct scope and your recommendation, it solves my issue.

thank you kindly

Trudy Claspill
Community Champion
July 30, 2024

You're welcome!

0 votes
Nicolas Grossi
Banned
July 29, 2024
Riccardo Gentile July 29, 2024

Hi @Nicolas Grossi 
Thank you for the response and reference.

Unfortunately, it doesn't quite relate to the issue I am struggling with.
I am able to detect the issue type of the issue that has triggered the automation rule.
But my problem is I am trying to detect if there is a specific linked issue to the original issue that triggers the automation rule. 

Suggest an answer

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

Atlassian Community Events