Customize Custom Field String per Project

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
douglasw7
Posts: 7
Joined: 03 Dec 2009, 15:56

Customize Custom Field String per Project

Post by douglasw7 »

I am trying to customize the string for a custom field on a per project basis. The custom field name is MyField, but I would like it to appear as ProjectField in all pages, reports, etc. for a specific project. By following the instructions from these posts/links:

http://www.mantisbt.org/forums/viewtopi ... =3&t=10757
http://www.futureware.biz/blog/index.ph ... &tb=1&pb=1
http://www.mantisbt.org/bugs/view.php?id=11999

I can make the field appear with a custom label on specific pages, such as the View page. However, I have been unable to find a way to change it in all instances for the project. I have tried some code like this in custom_strings_inc.php (and several other places as well):

Code: Select all

$t_project_name = project_get_name( helper_get_current_project() );
if ($t_project_name == 'MyProject' ) {
	$s_MyField = "ProjectField";
}
but I get an error from the first line (trying to retrieve the project name).

Any suggestions? Have I overlooked something obvious? I'm on Mantis 1.1.8 (and don't have time at the moment to update to 1.2.1).
Mantis: 1.1.8
PHP: 5.2.4
SQL: MySQL 5.0.45
OS: XP SP3
Post Reply