User Tools

  • Logged in as: anonymous (anonymous)
  • Log Out

Site Tools


mantisbt:customizing_relationships

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mantisbt:customizing_relationships [2007/07/29 02:27] – Added documentation for metadata structure vboctormantisbt:customizing_relationships [2018/09/07 02:47] (current) – Correct folder for Mantis >= 1.3.x, remove PHP closing tags from code atrol
Line 2: Line 2:
  
 **Author:** Victor Boctor **Author:** Victor Boctor
 +
  
 ===== Introduction ===== ===== Introduction =====
  
-Starting Mantis 1.1.0a4, it is possible to add your own custom relationships.  In this example, we will add "origin of" and "originates from" relationships.+Starting Mantis 1.1.0a4, it is possible to add your own custom relationships.  In this example, we will add "origin of" and "originates from" relationships.  These relationships will be supported the same way as native relationships: i.e. in View Issue page, relationship graphs, filters and email notifications.
  
 ===== Customization Steps ===== ===== Customization Steps =====
Line 11: Line 12:
 ==== Define Constants ==== ==== Define Constants ====
  
-Create custom_constant_inc.php in Mantis root folder and add the following code to it:+Create custom_constants_inc.php in Mantis config folder and add the following code to it:
  
 <code php> <code php>
Line 17: Line 18:
  define( 'BUG_CUSTOM_RELATIONSHIP_ORIGIN_OF',       99 );  define( 'BUG_CUSTOM_RELATIONSHIP_ORIGIN_OF',       99 );
  define( 'BUG_CUSTOM_RELATIONSHIP_ORIGINATES_FROM', 98 );  define( 'BUG_CUSTOM_RELATIONSHIP_ORIGINATES_FROM', 98 );
-?> 
 </code> </code>
  
 ==== Define Relationship Metadata ==== ==== Define Relationship Metadata ====
  
-Create custom_relationships_inc.php in Mantis root folder and add the following code to it:+Create custom_relationships_inc.php in Mantis config folder and add the following code to it:
  
 <code php> <code php>
Line 43: Line 43:
  '#edge_style' => array ( 'style' => 'dashed', 'color' => '808080' ),  '#edge_style' => array ( 'style' => 'dashed', 'color' => '808080' ),
  );  );
-?> 
 </code> </code>
  
Line 56: Line 55:
 ==== Define Custom Strings ==== ==== Define Custom Strings ====
  
-Create custom_strings_inc.php in Mantis root folder and add the following code to it:+Create custom_strings_inc.php in Mantis config folder and add the following code to it:
  
 <code php> <code php>
Line 67: Line 66:
  $s_email_notification_title_for_action_originates_from_relationship_added = 'Originates-From Relationship Added';  $s_email_notification_title_for_action_originates_from_relationship_added = 'Originates-From Relationship Added';
  $s_email_notification_title_for_action_originates_from_relationship_deleted = 'Originates-From Relationship Deleted';  $s_email_notification_title_for_action_originates_from_relationship_deleted = 'Originates-From Relationship Deleted';
-?> 
 </code> </code>
 +
 +===== Problems =====
 +
 +The legend below the graphs does not contain customized relationships (see issue [[http://www.mantisbt.org/bugs/view.php?id=13203|13203]]).
  
 ===== Acknowledgement ===== ===== Acknowledgement =====
  
 This feature was contributed by kratib ([[http://www.mantisbt.org/bugs/view.php?id=8130|8130]]). This feature was contributed by kratib ([[http://www.mantisbt.org/bugs/view.php?id=8130|8130]]).
mantisbt/customizing_relationships.1185690476.txt.gz · Last modified: 2008/10/29 04:32 (external edit)

Driven by DokuWiki