Feature #13690

Allow plugins to be able to add relationship types

Added by Matt Andrews over 4 years ago. Updated over 4 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Plugin API
Target version:-
Resolution:

Description

This is somewhat related to #7849 but (I think) involves significantly less work.

Firstly - can we make the TYPES constant a class variable (eg. @types)?
Secondly - can the ".freeze" on the object inside the TYPES constant (now a class variable called
@types) be removed? (If necessary it could always be lazily frozen at some time later after the plugins have had a chance to add a relation...)

around source:trunk/app/models/issue_relation.rb@11711#L65

Unless I'm mistaken this should be all that would be required to give redmine plugins the authority to add/remove relationship types.

  1. Eg, a plugin would be able to do something like this
    IssueRelation.class_eval("@@types[:supercedes] = 'Adding a relation'")

Related issues

Related to Redmine - Feature #7849: custom issue relation types New 2011-03-13
Related to Redmine - Feature #15340: Custom field referencing other tickets New

History

#1 Updated by Matt Andrews over 4 years ago

In the second paragraph the @ should be two @'s (@@) side by side but it seems my description has been mangled...

#2 Updated by Toshi MARUYAMA over 4 years ago

  • Description updated (diff)

#3 Updated by Toshi MARUYAMA almost 4 years ago

  • Related to Feature #15340: Custom field referencing other tickets added

Also available in: Atom PDF