Customize your mantis

Here I am not going to talk about how to config the Issue life cycle. There are so many life cycle articles talking about it, and each company all have their standard.

Some article you may interested related mantis debug life cycle

Here I want to talk about how to achieve this, in other words how to configure the display (the strings) in each selection.

Like in article, it talked about


An issue property, answering the question “when the problem occurs, how bad are the effects?” Specified by the reporter that created the issue, but may be changed later. Possible values are:

  • Feature: issue does not describe a problem
  • Typo: text is incorrect
  • Trivial: extremely minor issue
  • Minor: not trivial, but there is a workaround
  • Major: there is no workaround
  • Crash: product crashes
  • Block: prevents operating or testing part of system

[Note that I removed the default Mantis severity “Tweak”, since it seemed too close to “Trivial”. I also renamed “Text” to “Typo”, since the latter seems clearer.]


An issue property, giving how often the issue has been seen when trying to reproduce it. Specified by the reporter that created the issue, but may be changed later. Possible values are:

  • always
  • sometimes
  • rarely
  • not seen again
  • have not tried
  • N/A

[Note that the default Mantis strings are always, sometimes, random, have not tried, unable to reproduce, N/A. I’ve regularized them so that they all could fit into the same statement about reproducibility.]

How to make it? Although, mantis offer various customized related working flow and role and others in the web view, there are no straight configuration in Mantis web pages to achieve it.

Mantis have default setting of those strings, and default config setting:

config_filter_defaults_inc.php   (contain global strings)

/core/constant_inc.php            (contain constant define)

/lang/*.txt  (for English language is strings_english.txt)

The most beautiful thing is you do not have to modify these default setting, what you have to do is to use custom setting file to overwrite them.

Here is the solution,

Create two files under mantis root folder:



And in custom_constant_inc.php file write the code below, you do not have to define the constant system already have.

# severity
define( 'TYPO', 15 );

# reproducibility

In custom_strings_inc.php write those:

# Note that we don’t have to remove the Updater entry from the
if ( lang_get_current() === 'english') {
$s_severity_enum_string ='10:feature,15:typo,20:trivial,50:minor,60:major,70:crash,80:block';
$s_reproducibility_enum_string = '10:always,30:sometimes,35:rarely,40:not seen again,70:have not tried,100:N/A';}

And in config_inc.php

# Customize severity and default when reporting a new bug
$g_severity_enum_string = '10:feature,15:typo,20:trivial,50:minor,60:major,70:crash,80:block';
$g_default_bug_severity = 10;

# Customize priority and default when reporting a new bug
$g_reproducibility_enum_string = '10:always,30:sometimes,35:rarely,40:not seen again,70:have not tried,100:N/A';
$g_default_bug_reproducibility = 10;

All right, now log in your mantis, have a look at what we got:)


Using Mantis to tracking defects

I am working on a project with remote people. Right now, all our communication is using e-mails including the defects tracking. It is so hard to maintain e-mail, even you can make some label and group for it, it is not enough for a project.

The bug tracking step is very important for the whole quality of software, and QA will rely on it to monitor software developing processing.

“The main benefit of a bug-tracking system is to provide a clear centralized overview of development requests (including both bugs and improvements, the boundary is often fuzzy), and their state. The prioritized list of pending items (often called backlog) provides valuable input when defining the product roadmap, or maybe just “the next release”.” I copy this paragraph from wiki(

Also I believe bug-tracking record is a big knowledge resources, we can track what happened before, the avoid or fix what we are facing now.

Considering about the remote people, we have to select a product which can support remote working, so web-based system will be the best fit.

At last, I decide to use Mantis for our tracking system.

To install it is a really happy hour. It is not so hard to install.

I use xampp to solve the  Apache, MySQL, PHP and Mercury Mail issue. You just need to install xampp by double click the installing executable file, it is really enjoyable to have such a type of integrate software. (You can get it from

Next, to install mantis in our web server, download it from

unzip to a folder, for my case I unzip in this path: D:\mantis

and set up our Directory in apache, open httpd.conf, add the following content in it

Alias /mantis "D:/mantis/"
<Directory "D:/mantis/">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all

So that you can make mantis as your sub address of your site.

Like put localhost/mantis  in your browser address column, it will guide to mantis, be careful that you should modify D:/mantis/ to your path of mantis.

And do not forget set up your MySql root password, you can use this link to do it.


Next, I create a database name mantis for mantis using, and a account with fully privilege named mantis using phpMyAdmin

All right, next we should start to install mantis, if is not so hard, you can follow my step.

1. Unzip mantis download form  to D:/mantis which I have set it before.

2. Put localhost/mantis  in your browser address, so that browser will direct you to the mantis install page

3.install mantis

Type of Database:   MySQL(default)

Hostname (for Database Server):   localhost
Username (for Database),           the account name created before
Password (for Database)         :   the account password created before
Database name (for Database)     the database created before for my case is mantis
Admin Username (to create Database ifrequired),  MySql Admin Username mine is root
Admin Password (to create Database ifrequired):  the password
Print SQL Queries instead of Writing to theDatabase    make sure check it!

Click Install/Upgrade Database

3. All right now

Setting Database Hostname,  Setting Database Type,  Checking PHP support for database type, Setting Database Username, Setting Database Password, Setting Database Name, Setting Admin Username, Setting Admin Password, Attempting to connect to database as admin, Attempting to connect to database as user, Checking Database Server Version,  should be all GOOD in green.

But, there maybe still some BAD in Checking Installation section.

Now, what you have to do is copy all SQL commands from Installing Database Section and remove the warring information in red, and Paste them to SQL tab in mantis database

4. After doing all these, close your browser and re-open it put  http://localhost/mantis/ in address column. You can see the log in page of mantis. That means you have install mantis correctly. You can use default account to log in mantis which is :

Account Name: administrator

Password: root

Well, next what you have to do is to configure mantis.

Extra JpGraph installation:

JpGraph is useful for your summary and report in mantis to install you have to go to  to download it.

And unzip it in the root folder under mantis. Add next two lines in config_inc.php of mantis

$g_jpgraph_path= 'jpgraph/src/';

Attention, If you do not like administrator as admin account, Please do not remove the default till you have set up e-mail and create your own admin account. Or you can just change the password of the administrator for future use.

To configure e-mail function of mantis is a really high priority tasks, because without e-mail supporting you can not register user for mantis.

For my case, I use Mercury as my e-mail server. Thanks to which guide me set up my Mercury

To make it working correctly you have to do the step following:

Setup DNS for your NIC

  • Go to Start->Network Connections
  • Edit the NIC you are using
  • Double Click TCP/IP settings
  • Manually enter in the DNS servers from your ISP

Disable unneeded Protocols

  • Start Mercury from the Control Panel
  • Disable everything except the MERCURYC SMTP RELAY CLIENT and MERCURYS SMTP SERVER
  • Restart Mercury

Make Changes to Core Module

  • Check to make sure “localhost” is the value of “internet name for this system”
  • Disable all but “send copies of all errors to postmaster”
  • check tab “Local Domains” make sure Localhost is there
  • Close and save

Edit MercuryS SMTP Server

  • Choose general tab and enter name as SMTP
  • Make sure port 25 is listed
  • Add to “IP interface to use”
  • Go to Connection Control and add to the list
  • Un-check “do not permit SMTP relaying to non-local mail”
  • Close and Save

Edit MercuryC SMTP Client

  • Enter in external SMTP client ( for example) on port 465 with SSL encryption using direct connection (or whatever ports are supported)
  • Enter your login name (in most case it should be the full name of e-mail address)and password to that external SMTP server
  • Close and Save

Edit PHP.INI file to include from line

  • Then go edit your PHP.INI file in XAMPP
  • Under [mail function] add the line “sendmail_from = admin@localhost
  • Stop and restart Mercury and Apache

Here is my setting of PHP.ini, I also create php_mail.log under \xampp\apache\logs to log php mail function event.

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
sendmail_from = admin@localhost

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = Off

; Log all mail() calls including the full path of the script, line #, to address and headers
mail.log = "C:\xampp\apache\logs\php_mail.log"

For mantis config_inc.php, you can copy my setting, make sure to use PHPMAILER_METHOD_MAIL since if you use my way, since I rely on the main() of PHP

# --- Email Configuration ---
$g_smtp_host			= 'localhost';			# used with PHPMAILER_METHOD_SMTP
$g_smtp_username		= '';					# used with PHPMAILER_METHOD_SMTP
$g_smtp_password		= '';					# used with PHPMAILER_METHOD_SMTP
$g_administrator_email  = '';
$g_webmaster_email      = '';
$g_from_name			= 'Mantis Bug Tracker';
$g_from_email           = '';	# the "From: " field in emails
$g_return_path_email    = '';	# the return address for bounced mail
$g_email_receive_own	= OFF;
$g_email_send_using_cronjob = OFF;

Now,reset your apache, mercury, and you should have enabled the E-Mail Function of Mantis. Enjoy it. you can register and e-mail any event from Mantis.