Project

General

Profile

Actions

Patch #37636

closed

Ignore statuses if workflow only defines identity transition

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:

Description

When editing workflow transitions, we are implicitly storing identity transitions (from a status to the same status, i.e. old_status_id == @new_status_id). These transition rules are created because the editor renders (disabled) checked checkboxes for those.

These transitions however are not removed when

  • checking for statuses used by a workflow (which thus causes any statuses which where previously used in a workflow to always be included in the workflows editor, even when "Only display statuses that are used by this tracker" is checked)
  • as well as when getting a list of statuses in use by a tracker in Tracker#issue_statuses

As the checkboxes for the identity transitions are disabled, those statuses can not be removed by admins.

The attached patch filters the returned statuses by ignoring the identity transitions and only considering transitions for a status to a different status.

Note that for issues, the current status of an issue is generally still allowed. This is ensured by a custom rule for the initial_status in Issue#new_statuses_allowed_to. Thus, the identity transitions are not required to be in the database for this to work.


Files

Actions #1

Updated by Go MAEDA about 2 years ago

  • Target version set to 5.1.0

Setting the target version to 5.1.0.

Actions #2

Updated by Go MAEDA about 2 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the fix. Thank you.

Actions

Also available in: Atom PDF