Project

General

Profile

Defect #35038 » fix_invalid_time_entry.patch

fix invalid time_entry - Kam Nazir, 2021-04-05 16:08

View differences:

app/models/time_entry.rb (revision 30ed1a4be268d5b863ac736176dd275c08a54b2a) → app/models/time_entry.rb (date 1617630564995)
113 113
            self.project_id = issue.project_id
114 114
          end
115 115
          @invalid_issue_id = nil
116
        elsif user.allowed_to?(:log_time, issue.project) && issue.assigned_to_id_changed?
117
          tmp_previous_assignee = issue.assigned_to
118
          issue.assigned_to = issue.previous_assignee
119
          unless issue.visible?(user)
120
            @invalid_issue_id = issue_id
121
          end
122
          issue.assigned_to = tmp_previous_assignee
116 123
        else
117 124
          @invalid_issue_id = issue_id
118 125
        end
    (1-1/1)