Hi!
I have a workflow with two transition options between two status.
And an automation that should update a field based on which of the two transitions was used.
In the automation, how can I know which of the transitions reached the new status? There is no smart value for the transition.
Thank you.
Hi @Francesc Juventeny ,
Maybe you could add new hidden field (e.g. LastTransitionUsed) to your work items, and within workflow, for each transition add a post function that will add value (name of the transition) to the hidden field LastTransitionUsed.
Then you can use automation that will trigger on issue transition or field change and check for the value of the field - and use conditional logic.
Kind regards,
Benjamin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is too complex for my technical level. But thanks for mentioning the possibility!
Best regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't know. Automation allows you to change the status of your work item (and additionally update fields if necessary), but it does not use your workflow transitions to perform the update - although a transition must be available from one status to another in order to let your automation rule make the status update.
I am sure there is conditional logic inside your workflow transitions. So I would recommend to add the same logic to your automation rule as well, so you can perform the field update in the same way your transitions handle this.
Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can't apply logic to the automation because, at this point, the decision to use one transition or the other is made by the operator handling the request.
Thanks!
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.