Feature #31206

Tracker change, avoid to set blocked status for user changing issue

Added by Jérôme BATAILLE over 3 years ago. Updated over 3 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues workflow
Target version:-
Resolution:

Description

Hi,

If the tracker is changed, and the old status is accessible with the new tracker to a least one user in the workflow, but not the user making the change, no compatible status is proposed to the user, the status is not changed.
This leads after the update to a blocked status for him (no possibility to change the status unless to go back to the previous tracker).

Wouldn't it be a good idea to propose a compatible status for him ?
We can suppose that if he can change the tracker, it is reasonable to go to a non blocked state for him, does it makes sense ?

This happens in Issue.new_statuses_allowed_to method :

    if new_record?
      # nop
    elsif tracker_id_changed?
      if Tracker.where(:id => tracker_id_was, :default_status_id => status_id_was).any?
        initial_status = default_status
      # HERE we could check only issue statuses accessible to the user
      elsif tracker.issue_status_ids.include?(status_id_was)
        initial_status = IssueStatus.find_by_id(status_id_was)
      else
        initial_status = default_status
      end
    else
      initial_status = status_was
    end

Thank for your thinkings on this issue.

History

#1 Updated by Jérôme BATAILLE over 3 years ago

Here is a patch to avoid stucked status for user.

Also available in: Atom PDF