Write a paster command to fix discussions for trackers messed up by buggy 'ticket move' feature.
The bug in 'ticket move' feature was fixed in [#5691], [#5708]. Command should fix the existing issues caused by that bug.
Created #264: [#5727] Command for fixing discussion instances in trackers with moved tickets (2cp)
Since this will be a one-off script, I don't think it needs to be a proper "command" but can be a script in scripts/migrations/
Already done it as a command, but I think [#5730] would affect this to, so we can change it to a script when making changes related to [#5730], if it's necessary.
It's not a big deal, if you already have it done as a command that's fine.
Closed #264. allura:je/42cc_5727
You can run command as follows:
$ cd ForgeTracker
$ paster fix-discussion /var/local/allura/Allura/production.ini project_name_or_id
If you omit project_name_or_id then command will run for all projects.
Minor performance note: looping through all the projects with a regular loop has issues on a very large database of projects, should use chunked_find. Doesn't matter in this case since we are just going to run it for specific projects, but noting it for the future.
Ok, I'll keep it in mind.
Log in to post a comment.