[Topic] recovering deleted projects/issues

is there a way to manually (through DB editing) recover deleted projec/issues? how? if the project was deleted, were the issues deleted as well? if not, how can i find them to move to a different project?

thanks

—Posted by slava on Mar 27, 2007

Issues belonging to a deleted project are not deleted. They should still be accessible through the main issue list. Child projects also wouldn't get deleted, though I think they would become orphaned and unaccessible. Some more thought probably needs to be taken to make sure related records are handled gracefully when something is deleted.

There is a way to manually recover deleted items. To find deleted items, connect to the AgileTrack database using a MySQL client and "SELECT * FROM record WHERE deleted = 1". You'll be able to see the record type of the deleted item, its title, when it was modified, its ID, etc. Find the record you're interested in and set its 'deleted' value back to 0.

Clients may have the record already cached, so to make sure the client get the updated record, the record's 'revision' needs to be updated. To get a new revision number, do the following:

SET @revision_number := 0;
SELECT @revision_number := revision_sequence AS number FROM sequence UNION SELECT max(revision) AS number FROM record ORDER BY number DESC;
UPDATE sequence SET revision_sequence = @revision_number;

Then, update the record to have the reserved revision number—"UPDATE record SET revision = @revision_number WHERE id = ?".

I think that should do it. If you don't want to do the revision number update, clearing the cache on the client would also work.

—Posted by Adam Lane on Mar 27, 2007 at 2:08:30 PM

that worked. thanks. better interface would be nice:)

—Posted by slava on Mar 27, 2007 at 7:22:54 PM


You may post a reply to this topic, but you must be logged in. If you already have an account, you may login now. If you need to create an account, you may also register now.