Project

General

Profile

Defect #34778 » 0026-Change-status_id-first-when-update_issue_from_params.patch

Frederico Camara, 2021-02-20 19:59

View differences:

app/controllers/issues_controller.rb
509 509
        return false
510 510
      end
511 511
    end
512
    @issue.safe_attributes = issue_attributes
512

  
513
    # Do status_id first as it could change permissions
514
    @issue.safe_attributes = issue_attributes.slice("status_id")
515
    @issue.safe_attributes = issue_attributes.except("status_id")
513 516
    @priorities = IssuePriority.active
514 517
    @allowed_statuses = @issue.new_statuses_allowed_to(User.current)
515 518
    true
(2-2/2)