プロジェクト

全般

プロフィール

Vote #79238

完了

Recalculate issue priority position names if default value changed

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
2
version_id:
99
issue_org_id:
28494
author_id:
2784
assigned_to_id:
332
comments:
5
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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.


journals

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.

* attachment:0001-Recalculate-issue-priority-position-names-if-default.patch
* attachment:28494-test.patch

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

Admin Redmine さんが約4年前に更新

  • カテゴリIssues_2 にセット
  • 対象バージョン4.0.0_99 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0