Customize mantisbt

Supun Dharmarathne
technodyne
Published in
2 min readFeb 2, 2012

Mantisbt is an open source bug tracking tool. This is scripted by php. This tool enhance the efficiency of the whole bug tracking process and development process. You can download mantisbt from here. In the default configuration of mantis, there are lot of stuff integrated with that. But this features can be changed according to the users need.

For an example, the QA engineer should be able to report the bug and that bug should not be edited or deleted by the developer or any other user. By customizing mantis we can add the features that we need.

It s very simple.

  • Download mantis and install it to your server.
  • Create the following php files in your root folder. custom_constants_inc.php,custom_strings_inc.php ,config_inc.php .
  • Keep in mind that only these files should be edited.
  • Then go to mantisbt/core and open the constant_inc.php file.

Suppose you want to add new role called QUALITY_ASSURANCE_ENGINEER. Then you just add this to custom_constants_inc.php.

add this line to above file .

[sourcecode language=”php”]

define(‘QUALITY_ASSURANCE_ENGINEER’,80);

[/sourcecode]

Then add following to config_inc.php file.

[sourcecode language=”php”]

$g_access_levels_enum_string =
‘10:viewer,55:developer,80:quality_assurance_engineer,90:administrator’;

[/sourcecode]

Keep in mind that other roles have been already defined in the constant_inc.php file. According to the value defined above, there privileges are changed.

Finally add this lines of code to custom_strings_inc.php. This file is used for localization of the product.

[sourcecode language=”php”]
if ( lang_get_current() === ‘english’ ) {
#custom string for the desired users
$s_access_levels_enum_string =
‘10:Viewer,55:Developer,80:Quality Assurance Engineer,90:Administrator’;
}
[/sourcecode]

Now you are ready to go. Save the file and log in to mantisbt. Now you can see that there are only four user roles. But before customizing that , there were 6–7 user roles. Adding user privileges, customizing the functionalists, can be set like this. First refer the config_defaults_inc.php . Then add the features on the fly.

--

--