I'm working on a global automation in Jira Cloud that is scheduled to run on each business day that checks if a linked issue status has changed. I understand how powerful some of these automations can be and would just like some others that are more familiar with automation to take a look.
The idea I'm trying to accomplish is to take issues from one project, look for a linked issue that matches from another project and specified issue link type, and check the status. If the status doesn't match, transition the triggering issue.
Trigger
- Scheduled
- Run rule every 1 week, Mon-Fri
- Run a JQL Query = true
- JQL Query
- project = "project_name_a" AND issueLinkType = "is caused by" AND statusCategory != Done
If: all match
- Linked Issues
- Match Types: is caused by
- Match specified JQL
- project = "project_name_b" AND status = "Backlog"
- Status does not equal "Preparing"
Then
- Transition the issue to "Preparing"
The If/Then repeats two more times with very similar conditions checking for the different statuses and trying to make them match. Is there a better way to write this, or does this seem sound enough to work without causing things to happen on other unintended issues?
The first Query in the Trigger is yielding the results I would expect. The second query in the If statement is yielding more results than I expect, however they do match the query as expected. I want to make sure that only issues found in the first query are the issues being changed.