I want to transition an issue automatically between 2 statuses, each time it is commented on by the assignee, so that it assigns to alternating parties while waiting for their response.
I have a simple workflow that consists of "Waiting for Vendor" and "Waiting for Developer", and "Closed" statuses.
- I created a Transition from each of the "Waiting" statuses.
- Neither have conditions or validators
- Neither have post function to assign the issue to a user, and update the summary field
- Destination step is the opposing "Waiting" status (Vendor > Developer) or (Developer > Vendor)
I'm using 2 automation rules in the JIRA Automation plugin to listen for IssueCommented and transition the issue appropriately
- "Vendor Comment" rule
- Type = Issue Event Trigger
- Event = Issue Commented
- JQL is: issuetype = "A Subtask" and status = "Waiting for Vendor"
- Restriction: Event author is assignee.
- Transition (from "Waiting for Vendor" to "Waiting for Developer")
- Disable Notification = Yes
- No transition fields
- "Developer Comment" rule
- Everything same as Vendor Comment rule except:
- JQL is: issuetype = "A Subtask" and status = "Waiting for Developer"
- Transition (from "Waiting for Developer" to "Waiting for Vendor")
This works as expected, except for one thing.
- When status = "Waiting for Vendor" and I log in as the vendor user/assignee, and make a comment:
- Transitions immediately to "Waiting for Developer"
... perfect... but when I refresh the page...
- It's back in "Waiting for Vendor"
According to history - the automation is
- detecting the IssueCommented event, authored by the Vendor user, who is the assignee and also the user who entered the comment
- Completes the transition to "Waiting for Developer", also assigning to the Developer user at the same time
- SOMEHOW triggers the "Developer Comment" rule, even though the only comment on record is the one from the Vendor... so we go right back to "Waiting for Vendor"
WHY does #3 happen. I feel that by all logic it should NOT, because:
- The Vendor is the only person who has ever commented on the issue
- The event author and Assignee were both the Vendor (does not match rules for Developer Comment)
- The Status of the issue was "Waiting for Developer" (does not match rules for Developer Comment)