Projects not ordered alphabetically after renaming project
|Assignee:||Jean-Philippe Lang||% Done:|
I have several projects on my Redmine database, and they are shown on the "Project" combo on the top right corner of the screen, as well as on the "Projects" main page.
I had a project called "Old EPOP". After changing it´s name to "EPOP Desktop" (on the project settings screen), the "Projects" main page and the combo keep showing the order as it was before, instead of ordering the projects alphabetically. Attached are some screenshots.
#10 Updated by William Roush almost 6 years ago
Etienne Massip wrote:
Confirmed on trunk.
About the patch, it would be great if there were a possibility to move the tree rebuild code to a more generic form in awesome_nested_set (haven't dug enough to say if it's actually possible).
I'll go ahead and investigate that.
#11 Updated by William Roush almost 6 years ago
- File AwesomeNestedSetOrderUpdatePatch.patch added
Attached is a fairly rough idea of how I think it could work (of course tweaks would be nice, I'm pretty rough with Ruby and Rails)
I also noticed we have a field called "order" that isn't default in awesome_nested_set, so it almost looks like we were on the track towards doing this anyway but stopped short.
#14 Updated by Jean-Philippe Lang almost 6 years ago
- Status changed from Confirmed to Closed
- Resolution set to Fixed
- use of an
after_savefilter instead of overriding
#save(cleaner and everything runs in a db transaction)
- no change to awesome_nested_set some we can upgrade/unvendor it more easily
- no need to call
Issue.update_versions_from_hierarchy_changewhen renaming a project
- additional tests
Thanks for digging into this.