• Community
  • Products
  • Jira
  • Questions
  • By mistake i have changed the workflow of one of my project, that has also changed the status of already raised tickets. Now all the tickets are in TODO state. Can i roll back this change and can go to previous state?

By mistake i have changed the workflow of one of my project, that has also changed the status of already raised tickets. Now all the tickets are in TODO state. Can i roll back this change and can go to previous state?

 

1 answer

1 vote
Vasiliy Zverev Community Champion Dec 07, 2016

You could try to get previous status using this SQL:

Select
	changeitem.OLDSTRING		as Status_was
	, changeitem.NEWSTRING		as Status_new
	, cwd_user.display_name		as Actor_Name
	, changegroup.CREATED		as Change_date
	, changegroup.*
from
	(Select
		changeitem.groupid
		, changeitem.ID
	from
		changeitem
	where
		changeitem.FIELD = 'status'
	) as onlyStatusChange
	join changeitem	on	onlyStatusChange.ID = changeitem.ID
	join changegroup
		join jiraissue	
			join project	on	jiraissue.PROJECT	=	project.ID
		on	 changegroup.issueid = jiraissue.ID
		join cwd_user	on	 changegroup.AUTHOR	= cwd_user.user_name
	on	onlyStatusChange.groupid = changegroup.ID
where
	project.pname = '' --enter name of a project
	and issuenum = 3 --enter issue number here
order by --change sort here
	changegroup.AUTHOR
	, changegroup.CREATED

That will get you the data you need to recreate it.  Do NOT try to "roll back" with this though.  Status is not a simple "field"

You need to put the old workflows (or similar ones) back in place, and then transition issues back trhough the workflow to where they should be, using the data given by this SQL.  Bulk edit will help you with that.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

890 views 3 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you