cancel
Showing results for 
Search instead for 
Did you mean: 

Why does my automation rule get triggered?

Accepted Solution

Why does my automation rule get triggered?

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

Accepted Solutions (1)

Accepted Solutions (1)

Agraj Mangal
Atlassian Team
Solution

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

Answers (0)