Why does my automation rule get triggered?

Troy Johnson
Contributor
August 15, 2023

I have an automation rule that is triggered when a value is added to the "Parent Link" on an issue (Bug/Story/Task). When this happens, the rule copies the value of a field from the parent issue (Epic) to the newly linked child issue. The problem I'm seeing is that the rule gets triggered anytime a new issue (Bug/Story/Task) is created even if the "Parent Link" is empty. The rule then fails because it tries to find the parent so it can copy the necessary information from parent to child but there is no parent linked to the newly created issue. I don't understand why the rule is being triggered to begin with. Here is the rule:

AutomationRule.jpgAutomationEditIssue.jpgAutomationCopyFieldValue.jpg

I have tried using the "Issue Field Condition" to validate that the "Parent Link" is not empty but the "Issue Field Condition" doesn't include the "Parent Link" or "Epic Link" fields in the list of available fields. I've added a conditional JQL query of "Parent Link is not EMPTY" which does seem to solve the problem but also increases the time of the query from less than one second to upwards of 15 seconds. Any other ideas on how I can get this to only trigger when there is actually a value in the "Parent Link" field?

Thanks in advance,

Troy

1 answer

1 accepted

0 votes
Answer accepted
Agraj Mangal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 17, 2023

Hi @Troy Johnson 

The reason your rule is triggering anytime a new issue (Bug/Story/Task) is created is due to the changes in JIRA around `epic-link` and `parent-link` being deprecated and replaced by `parent` See this for details.

Currently your trigger would mean that the rule is run anytime the `epic-link` or `parent-link` is changed. To rectify that, we recommend you can add an Advance compare condition such as 

Screen Shot 2023-01-03 at 2.45.18 pm.png

This should limit your rule to only run further when the issue parent is not epic thus achieving the earlier meaning of `parent-link`

diagram_JSW-Cloud_current-future-hierarchy-in-plans.png

Hope this helps,

Agraj

Troy Johnson
Contributor
August 22, 2023

Agraj,

Thanks for the information. It was sufficient for me to figure out the necessary changes. It was probably not clear in my original post but the problem I was having is that even when a story was created and not linked to any sort of parent, it was still triggering the event. Using your suggestion I was able to add an Advanced compare condition and check to see if the parent key was not empty. This seemed to solve the problem so THANK YOU!

Troy

NewAutomation.jpg

Like Agraj Mangal likes this

Suggest an answer

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

Atlassian Community Events