プロジェクト

全般

プロフィール

Vote #69687

未完了

Assign Priority based on Category

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

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

100%

予定工数:
category_id:
2
version_id:
0
issue_org_id:
8138
author_id:
32021
assigned_to_id:
0
comments:
7
status_id:
1
tracker_id:
2
plus1:
1
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

I have a rather strange request from a Customer and am wondering if there is already a patch for this somewhere (since I suck at Ruby).

The basic Idea is that the category a ticket is in determines it's Priority. I can hide the Priority from the form so users can't set that. But I somehow need to assign the priority based on what category is selected.

It would require extending either the data-model, or hacking directly into issues.rb with some before_create method and a switch statement on my categories.

Is there an existing patch out there for this? Because I am tempted to simply hack this into issue before_create, but then I'd had to make sure it only runs on this one project etc..


journals

--------------------------------------------------------------------------------
I think I fixed the issue myself.
Attached you can find my patch that does this pretty much in the same way as assign_to is being handled

Unfortunately I am a complete stranger to Rails so I really didn't know how to effectively write a test for this.. (it's all magic!) but from my testing so far it works.

greetings Daniel
--------------------------------------------------------------------------------
Git repo to pull this change from:

https://github.com/tigraine/redmine/tree/category-default-priority
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
Anyone can think of any alternative?
--------------------------------------------------------------------------------


related_issues

duplicates,Closed,21224,Assign a priority to a category

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

いいね!0
いいね!0