0001-Recalculate-issue-priority-position-names-if-default.patch

Holger Just, 2018-04-05 15:33

Download (1.07 KB)

View differences:

app/models/issue_priority.rb
19 19
  has_many :issues, :foreign_key => 'priority_id'
20 20

  
21 21
  after_destroy {|priority| priority.class.compute_position_names}
22
  after_save {|priority| priority.class.compute_position_names if (priority.saved_change_to_position? && priority.position) || priority.saved_change_to_active?}
22
  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?}
23 23

  
24 24
  OptionName = :enumeration_issue_priorities
25 25

  
26
-