Project

General

Profile

Actions

Patch #11898

open

Inheritable issue categories

Added by Serge Ballesta over 11 years ago. Updated over 4 years ago.

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

0%

Estimated time:

Description

This patch is related to issue #5358 and is written against rev 10433

Functional:

A project may recursively inherit categories from its parent. There is a chain of inheritance that stops at first ancestor that does not inherit.
Every issue can be assigned any issue category from its project or from inherited projects.
When an inherited category (containing issues) would be lost either by explicitly rejecting inheritance or by a change in hierarchy, a new issue category is created in the project that is being modified and all issues in sub-projects are automatically re-affected.
When explicitly destroying an issue category that has issues assigned to in the project or any sub-project, related issues can be re-assigned to any category form the project or any inherited category.

Limitations :

Global issue categories are not implemented.

Regressions :

None : if inheritance is not used, nothing is changed.

Implementation :

A new attribute "inherit" is created in project along with a new method inherited-categories
The list of inherited project is found from Project.self_and_ancestors.
The overhead of searching inherited categories in current use cases (assigning a category to an issue) should not be visible.
The overhead for less common use cases - changing parent, destroying a category might be more important

Tests :

All tests pass without failure or error - every new method is tested by a new test
Currently, new tests have not modified fixtures and use init methods.

Conversion to plugin :

It would be possible to generate a plugin from this patch, but as it modifies core Redmine methods and views, I cannot write one that would be portable across different Redmine versions.


Files

inherited_cat_vs10433.patch.gz (5.98 KB) inherited_cat_vs10433.patch.gz Serge Ballesta, 2012-09-20 12:19
inherit_cats-2.2.1.patch.gz (6.58 KB) inherit_cats-2.2.1.patch.gz Patch for inherited categories for Redmine 2.2.1 Serge Ballesta, 2013-02-17 12:43
inherit_cats-2.2.3.patch (35.1 KB) inherit_cats-2.2.3.patch Patch for 2.2.3 Ruedi Silvestri, 2013-02-25 15:57
inherit_cats-2.2-stable-2.patch.gz (7.55 KB) inherit_cats-2.2-stable-2.patch.gz Serge Ballesta, 2013-03-02 23:48
inherit_cats-2.2-stable-3.patch.gz (7.56 KB) inherit_cats-2.2-stable-3.patch.gz Serge Ballesta, 2013-03-06 23:32
inherit-categories-stable-2.3.2.patch.gz (7.6 KB) inherit-categories-stable-2.3.2.patch.gz Wolfram Ansin, 2013-07-26 17:22
inherit_cats-2.3.2.patch.gz (7.82 KB) inherit_cats-2.3.2.patch.gz Serge Ballesta, 2013-08-03 20:32
inherit_cats_2.5.1.stable.13138.patch.gz (7.77 KB) inherit_cats_2.5.1.stable.13138.patch.gz Egbert van der Wal, 2014-05-20 17:25

Related issues

Related to Redmine - Feature #5358: Share Issues Categories for sub-projectsNew2010-04-20

Actions
Actions

Also available in: Atom PDF