diff --git a/app/models/issue_category.rb b/app/models/issue_category.rb index 6efec6a..10464e8 100644 --- a/app/models/issue_category.rb +++ b/app/models/issue_category.rb @@ -35,7 +35,7 @@ class IssueCategory < ActiveRecord::Base # If a category is specified, issues are reassigned to this category def destroy(reassign_to = nil) if reassign_to && reassign_to.is_a?(IssueCategory) && reassign_to.project == self.project - Issue.update_all({:category_id => reassign_to.id}, {:category_id => id}) + Issue.where({:category_id => id}).update_all({:category_id => reassign_to.id}) end destroy_without_reassign end