Patch #28494
closed
Recalculate issue priority position names if default value changed
Added by Holger Just over 6 years ago.
Updated over 6 years ago.
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
- Target version set to 4.1.0
Confirmed the problem, setting target version to 4.1.0.
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".
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.
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.
- 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.
Also available in: Atom
PDF