Patch #28494
closedRecalculate issue priority position names if default value changed
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
Updated by Go MAEDA over 6 years ago
- Target version set to 4.1.0
Confirmed the problem, setting target version to 4.1.0.
Updated by Go MAEDA over 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".
Updated by Tomomi Yuzuriha over 6 years ago
- File 0002-Recalculate-issue-priority-position-names-if-default.patch 0002-Recalculate-issue-priority-position-names-if-default.patch added
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.
Updated by Go MAEDA over 6 years ago
- File 28494-test.patch 28494-test.patch added
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.
Updated by Go MAEDA over 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.