-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
1
-
Severity 3 - Minor
-
Issue Summary
When using the checkbox in a workflow to allow all statuses to transition to a specific status, or creating a new transition from any status to that same specific status, it's important to be aware of a potential issue. It's possible to accidentally transition from that status to itself, even though it's not a valid transition from the UI.
I've noticed that in certain situations, such as if a user has a slow browser and inadvertently sends the same request twice, the status could change from A to B, and then from B to B. While this won't ultimately change the final status, it could interfere with the normal behavior of a workflow, particularly if there are conditions using the Previous Status condition. In this case, the previous status won't be A as expected, but instead will be B.
Steps to Reproduce
This can be replicated by using the API to transition an issue:
- Add a Transition to Allow all statuses to transition to one specific status (e.g. From All > In Progress)
- From the UI you won't be able to transition between the same status
- However, you will be able to transition by using the API:
curl --request POST \ --url 'https://instance.atlassian.net/rest/api/2/issue/CMP-39/transitions' \ --user 'mail@domain.com:ATATT3xFfGF03o2-D24_Os2Zmyc5CB48ZKlYR48HvCepfHMoMEhPO733gsP-UCBXO6ZxtrLYAFgtZW_G0mw_eESHa3i_pQaG7fDpO39crzAbYNPmrf3N412eQ_9ORHhnjzr0ACh49Y8-9999999999999999999999999999999999999999999=99999999' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{"transition":{"id":"41","name":"In Progress","hasScreen":false,"isGlobal":true,"isInitial":false,"isConditional":false,"isLooped":false,"to":{"id":"3","name":"In Progress","statusCategory":{"id":4}}}}'
Expected Results
I would expect the UI and the API to be consistent.
Actual Results
The issue is transitioning between the same status and breaking the workflow since it's using Previous Status Condition (Condition to check if the issue has transitioned through a specified status or not)
Workaround
The workaround is to implement Conditions on each Transition from All statuses to specific status as shown below:
With this Condition the API will fail to transition issues within the same status.