View Issue Details

IDProjectCategoryView StatusLast Update
0021203mantisbtbugtrackerpublic2017-04-10 07:39
ReportercproensaAssigned Tocproensa 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.3.0-rc.2 
Target Version1.3.1Fixed in Version1.3.1 
Summary0021203: option auto_set_status_to_assigned can change status even if not allowed by workflow
Description

The option "auto_set_status_to_assigned" does not check if the transition into target assign status is allowed by workflow configuration

TagsNo tags attached.

Relationships

related to 0020682 closedcproensa Workflow transitions not consistent with bug action "change status to" 
related to 0021415 closedcproensa update documentation for option auto_set_status_to_assigned 
related to 0008464 closedcproensa $g_auto_set_status_to_assigned = ON does not always check for old status 
related to 0022676 new Don't change status 

Activities

cproensa

cproensa

2016-07-05 18:22

developer   ~0053517

The workflow can actually be bypassed by bug_update_page.php:
change "assigned to", and the status is changed even if now allowed by workflow configuration

cproensa

cproensa

2016-07-05 18:37

developer   ~0053518

Additionally:
When "assigned status" is not an allowed transition in workflow configuration,
the bug_actiongroup "assign" cannot be performed, resulting in the error:

"This issue cannot be changed to the requested status"

should the expected behaviour be assign the issues without status change?

cproensa

cproensa

2016-07-05 20:23

developer   ~0053519

PR: https://github.com/mantisbt/mantisbt/pull/811

Related Changesets

MantisBT: master 5de0133c

2016-07-05 18:01:32

cproensa


Committer: vboctor Details Diff
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
modified:
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

MantisBT: master-1.3.x 62cb79c5

2016-07-05 18:01:32

cproensa


Committer: vboctor Details Diff
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
modified:
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

Issue History

Date Modified Username Field Change
2016-07-05 17:49 cproensa New Issue
2016-07-05 18:03 cproensa Assigned To => cproensa
2016-07-05 18:03 cproensa Status new => assigned
2016-07-05 18:04 cproensa Relationship added has duplicate 0020682
2016-07-05 18:04 cproensa Status assigned => resolved
2016-07-05 18:04 cproensa Resolution open => duplicate
2016-07-05 18:22 cproensa Status resolved => confirmed
2016-07-05 18:22 cproensa Note Added: 0053517
2016-07-05 18:35 cproensa Relationship deleted has duplicate 0020682
2016-07-05 18:35 cproensa Relationship added related to 0020682
2016-07-05 18:37 cproensa Note Added: 0053518
2016-07-05 20:23 cproensa Note Added: 0053519
2016-07-07 02:41 atrol Resolution duplicate => open
2016-07-22 20:26 vboctor Changeset attached => MantisBT master 5de0133c
2016-07-22 20:26 vboctor Assigned To cproensa => vboctor
2016-07-22 20:26 vboctor Status confirmed => resolved
2016-07-22 20:26 vboctor Resolution open => fixed
2016-07-22 20:26 vboctor Fixed in Version => 2.0.0-beta.2
2016-07-22 20:27 vboctor Target Version => 2.0.0-beta.2
2016-07-22 20:27 vboctor Assigned To vboctor => cproensa
2016-07-23 01:50 vboctor Changeset attached => MantisBT master-1.3.x 62cb79c5
2016-07-23 01:51 vboctor Fixed in Version 2.0.0-beta.2 => 1.3.1
2016-07-23 01:51 vboctor Target Version 2.0.0-beta.2 => 1.3.1
2016-07-23 06:19 cproensa Relationship added related to 0021415
2016-08-17 21:03 cproensa Relationship added related to 0008464
2016-08-28 01:12 vboctor Status resolved => closed
2017-04-10 07:39 atrol Relationship added related to 0022676