You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have a requirement where someone mistakenly changes/updates the issue status now he/she wants to go to the previous status.
Is there any possible way to undo the transitions?
let's assume one example here,
We transit the issue status from "In Progress" to "Done" by mistake because of the action updated issue is on "Done" status and resolution is set to Done automatically.
We must reverse the operation to the previous status "In progress" with the empty resolution.
Hi @Wasim Ansari ,
If your project is company managed, all you need is a transition in your workflow that goes to the previous status. In that transition, add a postfunction that clears the resolution field.
The challenge is obviously that mistakes can happen on any transition in your workflow and you may face the situation where you may find yourself tempted to add transitions that go in the opposite direction as your normal workflow would go. Global transitions (where issues can transition from any status into any other) help resolve that challenge, but that also leads to a situation where there is no more process at all in place. You may also consider to add a reopen transition for this scenario, where you then let your users move the issue through the workflow into the status it had before.
Hope this helps!
Hi @Wasim Ansari , thanks for your question.
You can modify the workflow to allow to go back one step, and use a Post Function to clear the resolution, but you won't be able to erase from the history of the issue that the transition was executed.
If you want to avoid that people can make transitions they shouldn't be able to, you can also, while you are anyway modifying your workflow, add Conditions or Validators to the transition so that, for example, maybe only administrators or the assignee or reporter can transition an issue to the Done status.
If we take this workflow as an example, you can see there is a transition to return from 'Done' back to 'To Do', and there are 6 Post Fuctions, as well as a Condition.
Clicking on the link to the Post Functions, we verify that the first Post Function after the transition from Done to To Do is to clear the resolution.
When we go to the Conditions tab in this same screen, we can see that there is a Condition that you have to have the 'Resolve issues' permission in the project to even be able to see this transition. Conditions check your access to the project or issue, and, on that basis, either show you the transition or not. Validators, instead, would show you still the possibility to transition the issue, to go back to the 'To Do' status, but if you didn't have enough permission, the transition would fail and you get an error message. For this reason, some people prefer to use validators as you can help users understand better why they can't do something, instead of just hiding stuff they shouldn't see.
Anyway, I hope this helps you. Here is the documentation, which you can also review - Configure advanced issue workflows | Atlassian Support.