Custom issue relationship text doesn't show up

Get help from other users here.

Moderators: Contributor, Developer

Post Reply
The_Fireplace
Posts: 2
Joined: Sep 06, 2018 9:04 pm
Contact:

Custom issue relationship text doesn't show up

Post by The_Fireplace » Sep 06, 2018 9:24 pm

Hi guys,
I set up a custom issue relationship following this guide, but where I would expect it to show up, the line is blank. Back when I was running mantis 2.12.0, nothing showed up there at all, then when upgrading to Mantis 2.17.0, it had me move the custom_*_inc files to the config folder, and this showed up.
Image
Here is my code:
custom_constants_inc.php

Code: Select all

<?php
define( 'BUG_CUSTOM_RELATIONSHIP_DEPENDENCY_OF', 99 );
define( 'BUG_CUSTOM_RELATIONSHIP_DEPENDS_ON', 98 );
custom_relationships_inc.php

Code: Select all

<?php
$g_relationships[ BUG_CUSTOM_RELATIONSHIP_DEPENDENCY_OF ] = array(
    '#forward' => true,
    '#complementary' => BUG_CUSTOM_RELATIONSHIP_DEPENDS_ON,
    '#description' => 'rel_dependency_of',
    '#notify_added' => 'email_notification_title_for_action_dependency_of_relationship_added',
    '#notify_deleted' => 'email_notification_title_for_action_dependency_of_relationship_deleted',
    '#edge_style' => array ( 'style' => 'dashed', 'color' => '808080' ),
);

$g_relationships[ BUG_CUSTOM_RELATIONSHIP_DEPENDS_ON ] = array(
    '#forward' => false,
    '#complementary' => BUG_CUSTOM_RELATIONSHIP_DEPENDENCY_OF,
    '#description' => 'rel_depends_on',
    '#notify_added' => 'email_notification_title_for_action_depends_on_relationship_added',
    '#notify_deleted' => 'email_notification_title_for_action_depends_on_relationship_deleted',
    '#edge_style' => array ( 'style' => 'dashed', 'color' => '808080' ),
);
custom_strings_inc.php

Code: Select all

<?php
$s_rel_dependency_of = 'dependency of';
$s_rel_depends_on = 'depends on';

$s_email_notification_title_for_action_dependency_of_relationship_added = 'Dependency-Of Relationship Added';
$s_email_notification_title_for_action_dependency_of_relationship_deleted = 'Dependency-Of Relationship Deleted';
$s_email_notification_title_for_action_depends_on_relationship_added = 'Depends-On Relationship Added';
$s_email_notification_title_for_action_depends_on_relationship_deleted = 'Depends-On Relationship Deleted';
If anyone has any ideas about what I could try to get this working, I'd like to hear them. Thanks!
Mantis: 2.17.0
PHP: 7.0.31
SQL: MySQL 5.6.39-83.1

atrol
Site Admin
Posts: 7255
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Custom issue relationship text doesn't show up

Post by atrol » Sep 10, 2018 2:29 am

Works for me
CustomDependency.PNG
CustomDependency.PNG (11.07 KiB) Viewed 54 times
Are you sure that you have the right custom_strings_inc.php in config folder?
Please use Search before posting and read the Manual

The_Fireplace
Posts: 2
Joined: Sep 06, 2018 9:04 pm
Contact:

Re: Custom issue relationship text doesn't show up

Post by The_Fireplace » Sep 16, 2018 1:49 am

Deleting and re-uploading the file fixed the issue. Thanks!
Mantis: 2.17.0
PHP: 7.0.31
SQL: MySQL 5.6.39-83.1

Post Reply