Project

General

Profile

Feature #20822 » private_issue_notifications.diff

Karel Pičman, 2015-09-23 12:52

View differences:

app/models/issue.rb (working copy)
879 879
    if assigned_to
880 880
      notified += (assigned_to.is_a?(Group) ? assigned_to.users : [assigned_to])
881 881
    end
882
    if assigned_to_was
883
      notified += (assigned_to_was.is_a?(Group) ? assigned_to_was.users : [assigned_to_was])
882
    unless self.is_private?
883
      if assigned_to_was
884
        notified += (assigned_to_was.is_a?(Group) ? assigned_to_was.users : [assigned_to_was])
885
      end
886
      notified = notified.select {|u| u.active? && u.notify_about?(self)}
887

  
888
      notified += project.notified_users
884 889
    end
885
    notified = notified.select {|u| u.active? && u.notify_about?(self)}
886

  
887
    notified += project.notified_users
888 890
    notified.uniq!
889 891
    # Remove users that can not view the issue
890 892
    notified.reject! {|user| !visible?(user)}
    (1-1/1)