Rollback option?

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
riv
Posts: 8
Joined: 21 Jun 2015, 12:44

Rollback option?

Post by riv »

I have enabled anonymous access, and I've just had some idiot reopen every single issue on my tracker within about half an hour. Is there some sort of change history to undo all these actions?
atrol
Site Admin
Posts: 8374
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Rollback option?

Post by atrol »

There is no ready to run solution for it.

We had to deal with problems introduced by a spam user some weeks ago.
We created the following scripts to cleanup the database that can be useful when starting to create a script for your special purpose.
https://github.com/mantisbt/mantisbt-to ... b9daac3a18
Please use Search before posting and read the Manual
riv
Posts: 8
Joined: 21 Jun 2015, 12:44

Re: Rollback option?

Post by riv »

Oh, thanks for the link, I ended up using a php-based approach as well. My tracker was only spammed with status/resolution changes so I only had to undo the changes in mantis_bug_history_table and recalculate last_updated on every bug (btw how come anonymous users can change the resolution? or is that automatically done when an issue is reopened?)

Here's the code I used: http://pastebin.com/HngBU7c4
Not sure what other tables affect last_updated but those two seem to have been enough to get the list to its original state.
atrol
Site Admin
Posts: 8374
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Rollback option?

Post by atrol »

riv wrote:btw how come anonymous users can change the resolution? or is that automatically done when an issue is reopened?
Yes, there is a setting for it: $g_bug_reopen_resolution = REOPENED;
Please use Search before posting and read the Manual
Post Reply