bap14 / redmine_category_tree

Module for Redmine to allow categories to be a tree instead of a single-list
18 stars 21 forks source link

IssuesHelper Patch bug #8

Closed blrnw3 closed 10 years ago

blrnw3 commented 10 years ago

When a category is deleted and it had issues assigned, if you choose to reassign them to another category then the issues#show page for those issues will break.

This is because the IssuesHelperPatch has a bug - the alias_method_chain overrides a method in order to fix up the UI for the history entries but fails to account for the case of deleted categories (which the overridden Redmine method does). You see, Redmine puts in a history entry when an issue is reassigned a new category, as when the category deletion described above occurs, so unless caught, ActiveRecord will look for a missing category_id when trying to load the _history partial for the issues with reassigned categories.

The fix I chose was just to delete the alias_method_chain call since the UI fix was not desirable to me, but you probably want to fix it properly.