mantisbt:customizing_relationships
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mantisbt:customizing_relationships [2007/07/29 02:31] – Custom relationships are supported as native ones vboctor | mantisbt:customizing_relationships [2018/09/07 02:47] (current) – Correct folder for Mantis >= 1.3.x, remove PHP closing tags from code atrol | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Customizing Issue Relationships ====== | ||
| + | **Author:** Victor Boctor | ||
| + | |||
| + | |||
| + | ===== Introduction ===== | ||
| + | |||
| + | Starting Mantis 1.1.0a4, it is possible to add your own custom relationships. | ||
| + | |||
| + | ===== Customization Steps ===== | ||
| + | |||
| + | ==== Define Constants ==== | ||
| + | |||
| + | Create custom_constants_inc.php in Mantis config folder and add the following code to it: | ||
| + | |||
| + | <code php> | ||
| + | <?php | ||
| + | define( ' | ||
| + | define( ' | ||
| + | </ | ||
| + | |||
| + | ==== Define Relationship Metadata ==== | ||
| + | |||
| + | Create custom_relationships_inc.php in Mantis config folder and add the following code to it: | ||
| + | |||
| + | <code php> | ||
| + | <?php | ||
| + | $g_relationships[ BUG_CUSTOM_RELATIONSHIP_ORIGIN_OF ] = array( | ||
| + | '# | ||
| + | '# | ||
| + | '# | ||
| + | '# | ||
| + | '# | ||
| + | '# | ||
| + | ); | ||
| + | |||
| + | $g_relationships[ BUG_CUSTOM_RELATIONSHIP_ORIGINATES_FROM ] = array( | ||
| + | '# | ||
| + | '# | ||
| + | '# | ||
| + | '# | ||
| + | '# | ||
| + | '# | ||
| + | ); | ||
| + | </ | ||
| + | |||
| + | Following is the documentation for the metadata structure: | ||
| + | * The array index is the relationship type ID that you define for your custom relationships. | ||
| + | * '# | ||
| + | * '# | ||
| + | * '# | ||
| + | * '# | ||
| + | * '# | ||
| + | |||
| + | ==== Define Custom Strings ==== | ||
| + | |||
| + | Create custom_strings_inc.php in Mantis config folder and add the following code to it: | ||
| + | |||
| + | <code php> | ||
| + | <?php | ||
| + | $s_rel_origin_of = ' | ||
| + | $s_rel_originates_from = ' | ||
| + | |||
| + | $s_email_notification_title_for_action_origin_of_relationship_added = ' | ||
| + | $s_email_notification_title_for_action_origin_of_relationship_deleted = ' | ||
| + | $s_email_notification_title_for_action_originates_from_relationship_added = ' | ||
| + | $s_email_notification_title_for_action_originates_from_relationship_deleted = ' | ||
| + | </ | ||
| + | |||
| + | ===== Problems ===== | ||
| + | |||
| + | The legend below the graphs does not contain customized relationships (see issue [[http:// | ||
| + | |||
| + | ===== Acknowledgement ===== | ||
| + | |||
| + | This feature was contributed by kratib ([[http:// | ||
