This is a follow up question for this post:
Automation - How to know which transition was used?
Regarding the answer provided by @Marc -Devoteam-
You could use transition id
The you could in the automation do a web request action (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-get ) and based on the {{webResponse.body}} get the transition id
So trigger the rule on the transition from status A to B, do the web request and based on the response do an if/else is id = 1 then edit issue field Y, else if transition id = 2 then edit field Z
Marc, can you elaborate on this answer?
In my scenario I have multiple transitions to get to Done; i.e. Cancelled by Reporter, Resolved, Rejected. Each of these transitions can come from multiple statuses. Each of these transitions can be used by any given status. So, for instance I can go from Open to Done selecting any of those transitions, and I can go from In Progress to Done selecting any of those transitions.
My Automation Rule trigger would have multiple From statuses and the To status would be "Done".
I don't see how I can use the API to determine which of the tree transitions was used.
Can you elaborate on how you would do that?
I must admit that I have been incorrect in this case.
You can only get the transition ID, that are possible to use based on the issues current status, you can't determine which has been used, as mentioned by @Bill Sheboy
Not even the issue history APi call is able to record the transition id, it also only has the status id's, transition id's don't seem to be recoreded
Until we see Marc's answer...
I do not believe what you describe is possible for your scenario without a transition rule to set / update a field to note the specific transition.
Because there is a many-to-many workflow situation for your scenario, the only workaround I can envision is adding a transition rule to each transition to update a field, and then checking that value in the automation rule.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Bill - there are indeed unique transition ids for each transition in the workflow. If there are two different transitions going to the same TO status, there are different ids for each. Those can be see in the Text tab of the workflow editor.
Therefore, the question becomes that if you have the exact transition id for the transition in question, can that be used with the endpoint to achieve the desired result?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you John and Bill.
Bill's conclusions are the same that I had derived.
John, the issue is that I need the Automation Rule to be able to figure out, by itself, which transition caused it to trigger, without the transition having set some other piece of data in the issue (like a Label or custom field).
In the post I referenced Marc's response seemed to indicate there was a method to achieve what I want. I didn't want to necropost on that Question, so I started a new question and mentioned Marc in the hope that he would respond. I think he is located in Europe, though, so he probably won't see this until later.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, everyone!
I just did a quick check in the JAC and Ecosystem backlog spaces and found no suggestions / defects to add the transition ID to the appropriate endpoints to support this capability.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not able to select any of the Jira Cloud projects/spaces to open a new suggestion in JAC, so I'll be using the feedback option within Jira itself to make this suggestion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trudy,
If you go to the Workflow and switch to the Old Editor, then click on the Text tab instead of the Diagram tab, you should be able to see the transition id - it will be the one in parentheses under the Transitions (id) heading.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello John,
Yes, I know how to find the transition ID manually.
The question is how can an Automation Rule identify the exact transition that was used when it was triggered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.