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.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Created #264: [#5727] Command for fixing discussion instances in trackers with moved tickets (2cp)
Related
Tickets:
#5727Since 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.
Related
Tickets:
#5730It'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.