Project

General

Profile

Actions

Patch #28494

closed

Recalculate issue priority position names if default value changed

Added by Holger Just almost 6 years ago. Updated almost 6 years ago.

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

0%

Estimated time:

Description

The attached patch fixes the logic to set the position names of issue priorities which are used to define issue colours is assigned issues.

Before this fix, the names were not re-calculated if the default issue priority was changed. This resulted in the the previous colours being used which thus would not match with the defined order anymore.


Files

Actions #1

Updated by Go MAEDA almost 6 years ago

  • Target version set to 4.1.0

Confirmed the problem, setting target version to 4.1.0.

Actions #2

Updated by Go MAEDA almost 6 years ago

Steps to reproduce:

1. Assume that there are 5 active priorities, Low, Normal, High, Urgent, and Immediate. The default priority is Normal.
2. On the "Enumerations" page, edit the priority "High" and set the "Default value" flag true.
3. Check the CSS class for the issue whose priority is "High". The issue should have "priority-default" class but the actual class is "priority-high3".
4. Reorder priorities on "Enumerations" page.
5. Check the CSS class of the issue you saw in step 3. Position names are recalculated and the issue has correct CSS class "priority-default".

Actions #3

Updated by Tomomi Yuzuriha almost 6 years ago

I wrote a test so that this patch will be included in the Redmine core.
The test sets the first IssuePriority to the default and tests whether the position_name has changed.

Actions #4

Updated by Go MAEDA almost 6 years ago

Tomomi Yuzuriha wrote:

I wrote a test so that this patch will be included in the Redmine core.

Thank you for your contribution. I extracted a test from your work and changed the method name. We can apply the following patch to the core.

Actions #5

Updated by Go MAEDA almost 6 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from 4.1.0 to 4.0.0

Committed the patch by Holger Just and the test by Tomomi Yuzuriha. Thanks.

Actions

Also available in: Atom PDF