]> source.dussan.org Git - redmine.git/commitdiff
Recalculate issue priority position names if default value changed (#28494).
authorGo MAEDA <maeda@farend.jp>
Sat, 12 May 2018 03:25:33 +0000 (03:25 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 12 May 2018 03:25:33 +0000 (03:25 +0000)
Patch by Holger Just.

git-svn-id: http://svn.redmine.org/redmine/trunk@17329 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue_priority.rb

index a4c93370e1891bb78b576469e119c504d8090dbd..10b81b5770aa1b7f67a8aed34a52761d8b5117ac 100644 (file)
@@ -19,7 +19,7 @@ class IssuePriority < Enumeration
   has_many :issues, :foreign_key => 'priority_id'
 
   after_destroy {|priority| priority.class.compute_position_names}
-  after_save {|priority| priority.class.compute_position_names if (priority.saved_change_to_position? && priority.position) || priority.saved_change_to_active?}
+  after_save {|priority| priority.class.compute_position_names if (priority.saved_change_to_position? && priority.position) || priority.saved_change_to_active? || priority.saved_change_to_is_default?}
 
   OptionName = :enumeration_issue_priorities