comparison app/models/issue_category.rb @ 1517:dffacf8a6908 redmine-2.5

Update to Redmine SVN revision 13367 on 2.5-stable branch
author Chris Cannam
date Tue, 09 Sep 2014 09:29:00 +0100
parents e248c7af89ec
children
comparison
equal deleted inserted replaced
1516:b450a9d58aed 1517:dffacf8a6908
33 33
34 # Destroy the category 34 # Destroy the category
35 # If a category is specified, issues are reassigned to this category 35 # If a category is specified, issues are reassigned to this category
36 def destroy(reassign_to = nil) 36 def destroy(reassign_to = nil)
37 if reassign_to && reassign_to.is_a?(IssueCategory) && reassign_to.project == self.project 37 if reassign_to && reassign_to.is_a?(IssueCategory) && reassign_to.project == self.project
38 Issue.update_all({:category_id => reassign_to.id}, {:category_id => id}) 38 Issue.where({:category_id => id}).update_all({:category_id => reassign_to.id})
39 end 39 end
40 destroy_without_reassign 40 destroy_without_reassign
41 end 41 end
42 42
43 def <=>(category) 43 def <=>(category)