MantisBT: master-1.3.x 62cb79c5

Author Committer Branch Timestamp Parent
cproensa vboctor master-1.3.x 2016-07-05 18:01:32 master-1.3.x 1746e62c
Affected Issues  0021203: option auto_set_status_to_assigned can change status even if not allowed by workflow

move "auto_set_status_to_assigned" logic into bug_api

Create a bug api function to evaluate the resulting status after an
assignment action. This function account for the option
"auto_set_status_to_assigned", current handler and status, and requested
new handler and status.

The behaviour of assignments, when this option is enabled, is slightly
Previously, inconcistent logic allowed to transition a bug into assigned
status by changing handler user, even if the transition is not allowed
by workflow configuration.
Additionally, the assign action was not available to the user if the
assigned status is not reachable by workflow, even when the assign
action would not result in a status change.

Now, the assign action is always available (if allowed by permissions),
and the status change is performed only if the conditions are met,
otherwise, the handler change is always performed.

The conditions needed for automatic change to 'bug_assigned_status' are:

  • current handler is empty
  • new handler is not empty
  • status is not already part of the bug modification
  • current status is lower than 'bug_assigned_status'
  • 'bug_assigned_status' is reachable by workflow

Fixes 0021203

mod - bug_actiongroup.php Diff File
mod - bug_update.php Diff File
mod - core/bug_api.php Diff File
mod - core/bug_group_action_api.php Diff File
mod - core/html_api.php Diff File