Project

General

Profile

Defect #34856 » time_entry.diff

salman mp, 2021-03-08 16:16

View differences:

app/models/time_entry.rb Fri Dec 25 16:52:01 2020 +0330 → app/models/time_entry.rb Mon Mar 08 18:45:41 2021 +0330
114 114
          end
115 115
          @invalid_issue_id = nil
116 116
        else
117
          @invalid_issue_id = issue_id
117
          if user.allowed_to?(:log_time, issue.project) && issue.assigned_to_id_changed?
118
            tmp_previous_assignee = issue.assigned_to
119
            issue.assigned_to = issue.previous_assignee
120
            if !issue.visible?(user)
121
              @invalid_issue_id = issue_id
122
            end
123
            issue.assigned_to = tmp_previous_assignee
124
          else
125
            @invalid_issue_id = issue_id
126
          end
118 127
        end
119 128
      end
120 129
      if user_id_changed? && user_id != author_id && !user.allowed_to?(:log_time_for_other_users, project)
(1-1/3)