Custom Status Issue (Special Characters in Status Name)

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
udo
Posts: 47
Joined: Sep 09, 2010 6:42 am

Custom Status Issue (Special Characters in Status Name)

Post by udo » Sep 15, 2010 10:55 am

Regarding this:
http://docs.mantisbt.org/master/en/admi ... IZE.STATUS
I have the following use case:

In custom_strings_inc.php I have something similar to this:

Code: Select all

...
$s_status_enum_string = '...,55:in progress (internal),56:in progress (3rd party),...';

$s_in_progress_(internal)_bug_button = 'Button Text';
$s_in_progress_(internal)_bug_title = 'Title Text';

$s_in_progress_(3rd_party)_bug_button = 'Button Text';
$s_in_progress_(3rd_party)_bug_title = 'Title Text';
...
Unfortunately Mantis throws this errors:
  • Title: APPLICATION WARNING #300: String "in_progress_(internal)_bug_title" not found.
  • Button: APPLICATION WARNING #300: String "in_progress_(internal)_bug_button" not found.
  • Title: APPLICATION WARNING #300: String "in_progress_(3rd_party)_bug_title" not found.
  • Button: APPLICATION WARNING #300: String "in_progress_(3rd_party)_bug_button" not found.
I think it is related to the "(..)" part, but so far I was not able to get it to work...

Any clues how to make this work?

Thanks, Udo

istvanb
Posts: 226
Joined: Aug 22, 2010 4:00 pm

Re: Custom Status Issue (Special Characters in Status Name)

Post by istvanb » Sep 15, 2010 3:29 pm

Hi,

the solution is a little bit tricky, I hope I can explain it:

1, Assign the VISIBLE names to the workflow phases (this is what your users will see):

Code: Select all

$s_status_enum_string = '10:Submitted, 20:Assigned, 30:In work (blablablabla), 40:Done';
2, Assign an internal alias to these workflow phases (wont be visible for the users):

Code: Select all

$g_status_enum_string = '10:agent, 20:mulder, 30:loves, 40:scully';
3, Now you can define your strings:

Code: Select all

$s_loves_bug_button = "This is a button for in work (blablabla)";
$s_loves_bug_title ="This a title for in work (blablabla)";
$s_email_notification_title_for_status_bug_loves= "This will be email header for inwork (blablabla)";
This thing is case sensitive so $s_loves_bug_title ="This a title for in work (blablabla)"; DOES NOT EQUAL $s_Loves_bug_title ="This a title for in work (blablabla)";

I hope it helps!
i-

udo
Posts: 47
Joined: Sep 09, 2010 6:42 am

Re: Custom Status Issue (Special Characters in Status Name)

Post by udo » Sep 16, 2010 2:32 am

thanks, this worked :)

I also had to redefine my custom constants in custom_constants_inc.php:

Code: Select all

...
define('IN_PROGRESS_INTERNAL')
define('IN_PROGRESS_3RD_PARTY')
...
and then proceed like you explained.

Post Reply