Project

General

Profile

Actions

Defect #37635

closed

Respect Role#consider_workflow? when checking for allowed status transitions

Added by Holger Just about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues workflow
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When defining workflow rules for a role and tracker, we generally check if a role can have any workflows at all. Right now, only roles which have at least one of the edit_issues or add_issue permissions can have any workflows. We check this when displaying editable workflows for admins.

Now, it is possible that the database holds workflow rules for roles which currently do not have one of those permissions (but might have had in the past). Currently, when checking for the allowed issue statuses in Issue#new_statuses_allowed_to (which is used to validate possible new issue statuses for an issue), we do not take into account if the defined workflow rules shall be considered at all.

This might result in workflow rules take into account which can not be (directly) edited by admins, resulting in a rather surprising behavior.

The attached patch changes this by ensuring that we only use workflow transitions which are defined for roles having one of the permissions. Workflow transitions for other roles are ignored.


Files


Related issues

Related to Redmine - Defect #37229: Ignore workflow transitions that already defined and now is not appliableClosed

Actions
Related to Redmine - Defect #39493: Role with only :edit_own_issues no longer considered for workflowConfirmed

Actions
Has duplicate Redmine - Defect #28078: Workflows inconsistencies when removing "add/edit issue" permission to a role which already has a workflow definedClosed

Actions
Actions

Also available in: Atom PDF