Customization of status values

Post about your customizations to share with others.

Moderators: Developer, Contributor

Customization of status values

Postby pvenkat » Sep 14, 2011 12:39 am

I had installed Mantis 1.2.8 Version and tried customize some status values.

Requirement:
Want to add few more values for "Status"

Could anybody help me, how to do it please...

Regards,
Phani
pvenkat
 
Posts: 9
Joined: Jul 21, 2011 12:47 am

Re: Customization of status values

Postby atrol » Sep 14, 2011 10:00 am

Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3731
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Customization of status values

Postby sonc » Dec 16, 2011 3:27 pm

I've readed documentation, nowhere I found customization for ONLY 1 project.

I've done each step to customize status_enum_string.
I've managed workflow.
Everythink is fine.

Now i'd like that to customize user interface in html_api.php
I need to customize "function html_status_legend()" for displaying 'dynamic' legend status bar.

If a status is used in the workflow from selected projects than legend bar display this status.
For all projects and projects that not implements new status, no displaying complete status bar.

Thanks for help
sonc
 
Posts: 1
Joined: Dec 16, 2011 3:16 pm

Re: Customization of status values

Postby Hockeytown » Mar 16, 2012 11:27 am

atrol wrote:http://docs.mantisbt.org/master-1.2.x/en/administration_guide.html#ADMIN.CUSTOMIZE.STATUS


This link to the guide only states that the Status can be customized but doesn't say much else. Keep in mind I will not only be adding new Statuses but removing several of the existing ones to suit our needs. Most of the customizations I've done in our new Mantis 1.2.9 installation have been done on the following 3 files only:

\manitsbt\config_defaults_inc.php
\mantis\lang\strings_english.txt
\mantis\core\constant_inc.php

When adding/removing Statuses are there any other files affected? Anything else I should be aware of when doing this?
Hockeytown
 
Posts: 21
Joined: Oct 28, 2010 1:08 pm

Re: Customization of status values

Postby atrol » Mar 17, 2012 5:22 am

Hockeytown wrote:\manitsbt\config_defaults_inc.php
Never change this file, use config_inc.php for such kind of customizations
Hockeytown wrote:\mantis\lang\strings_english.txt
Never change this file, use custom_strings_inc.php for such kind of customizations
Hockeytown wrote:\mantis\core\constant_inc.php
Never change this file, use custom_constants_inc.php for such kind of customizations

Not in documentation, but my recommendation:
Use page "Manage" > "Manage Configuration" > "Workflow Transitions" instead of setting $g_status_enum_workflow.

Hockeytown wrote:When adding/removing Statuses are there any other files affected? Anything else I should be aware of when doing this?
Removing statuses is possible.
You have to adjust the following options in config_inc.php (read config_defaults_inc.php for explaination)

Code: Select all
$g_hide_status_default    = CLOSED;
$g_bug_submit_status = NEW_;
$g_bug_assigned_status = ASSIGNED;
$g_bug_reopen_status = FEEDBACK;
$g_bug_feedback_status = FEEDBACK;
$g_bug_readonly_status_threshold = RESOLVED;
$g_bug_resolved_status_threshold = RESOLVED;
$g_bug_closed_status_threshold = CLOSED;
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3731
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Customization of status values

Postby jsm » Apr 20, 2012 4:06 am

If an exapmle would be of any help:
I renamed 3 of the existing states and created an additional one. That changed ticket states
from '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed'
to '10:new,20:reopened,30:confirmed,40:deferred,50:assigned, 60:to be tested,80:resolved,90:closed'

changes made in config_inc.php:
Code: Select all
   # --- additional stati ---
   $g_status_enum_string =
                               '10:new,20:reopened,30:confirmed,40:deferred,50:assigned, 60:to be tested,80:resolved,90:closed';
   $g_status_colors = array( 'new' => '#ffa0a0', # red,
                             'reopened' => '#ff50a8', # purple
                             'confirmed' => '#ffffb0', # yellow
                             'deferred' => '#ffd850', # orange
                             'assigned' => '#c8c8ff', # blue
                             'to be tested' => '#ace7ae',  // green
                             'resolved' => '#cceedd', # buish-green
                             'closed' => '#e8e8e8'); # light gray

   # Status Settings
   $g_hide_status_default = CLOSED;
   $g_bug_submit_status = NEW_;
   $g_bug_assigned_status = ASSIGNED;
   $g_bug_reopen_status = REOPENED;
   $g_bug_feedback_status = ASSIGNED;
   $g_bug_readonly_status_threshold = RESOLVED;
   $g_bug_resolved_status_threshold = RESOLVED;
   $g_bug_resolution_fixed_threshold = RESOLVED;
   $g_bug_resolution_not_fixed_threshold = UNABLE_TO_DUPLICATE;

   # workflow definition
   $g_status_enum_workflow[NEW_]         = '20:reopened,30:confirmed,40:deferred,50:assigned,60:to be tested';
   $g_status_enum_workflow[REOPENED]       = '10:new,30:confirmed,40:deferred,50:assigned,60:to be tested';
   $g_status_enum_workflow[CONFIRMED]       = '20:reopened,40:deferred,50:assigned,60:to be tested';
   $g_status_enum_workflow[DEFERRED]       = '20:reopened,50:assigned,60:to be tested';
   $g_status_enum_workflow[ASSIGNED]       = '20:reopened,60:to be tested,90:closed';
   $g_status_enum_workflow[TEST]          = '10:new,20:reopened,50:assigned,80:resolved,90:closed';
   $g_status_enum_workflow[RESOLVED]       = '50:assigned,60:to be tested,90:closed';
   $g_status_enum_workflow[CLOSED]       = '50:assigned';


in custom_constants_inc.php:
Code: Select all
   /**
    * MantisBT custom stati
    */
   define ( 'DEFERRED', 40 );
   define ( 'TEST', 60 );


in custom_strings_inc.php:
Code: Select all
   /**
    * MantisBT custom stati
    */
   if ( lang_get_current() == 'german' ) {
      $s_status_enum_string = '10:neu,20:wiedereröffnet,30:bestätigt,40:zurückgestellt,50:zugewiesen,60:zu testen,80:behoben,90:geschlossen';
      $s_to_be_tested_bug_button = "fertig zum Test";
      $s_to_be_tested_bug_title = "zum Test übergeben";
      $s_email_notification_title_for_status_bug_to_be_tested = "Ticket ist bearbeitet und fertig zum Test.";
      $s_reopened_bug_button = "wiedereröffnen";
      $s_reopened_bug_title = "Eintrag wieder öffnen";
      $s_email_notification_title_for_status_bug_reopened = "Ticket wurde wieder geöffnet.";
      $s_deferred_bug_button = "zurückstellen";
      $s_deferred_bug_title = "Eintrag später bearbeiten";
      $s_email_notification_title_for_status_bug_deferred = "Ticket wurde zurückgestellt.";
      }
   else {
      $s_status_enum_string = '10:new,20:reopened,30:confirmed,40:deferred,50:assigned, 60:to be tested,80:resolved,90:closed';
      $s_to_be_tested_bug_button = "Issue Ready to Test";
      $s_to_be_tested_bug_title = "Set Issue Ready to Test";
      $s_email_notification_title_for_status_bug_to_be_tested = "The following issue is ready TO BE TESTED.";
      $s_reopened_bug_button = "reopen ticket";
      $s_reopened_bug_title = "Reopen Issue";
      $s_email_notification_title_for_status_bug_reopened = "The following issue was REOPENED.";
      $s_deferred_bug_button = "postpone";
      $s_deferred_bug_title = "Postphone Issue";
      $s_email_notification_title_for_status_bug_deferred = "The following issue was POSTPONED.";
      }
jsm
 
Posts: 4
Joined: Sep 13, 2011 10:01 am

Re: Customization of status values

Postby Rocky86 » Jun 28, 2012 3:26 am

Hello,

I am a new member and I really need your help.

I am using Mantis two weeks ago and I have many things to ask:

1. I defined two projects, and for each one I defined the statuses and they are completely different, but when I defined the statuses of teh second project I missed the statuses of the first project why? and what about the number in (20:new for example ) means?? because I used to put this number as I want but I saw that when I used 11 for example teh status is not showing on and if I change the number it will be OK why?
And shall I have to write if statement to be able to show the two project statuses??

2. How can link issue attribute to another one? I mean the following:

If the user shows "issue new) then new attributes have to be shown and the user has to fill and if he moved to "issue confirmd for example" some more attributes have to be shown to be filled by the user so how to do that??

3. How can I change the taps (view issues, report issues .....) specifically for each project ???????

I really need your help ....

Thank you in advance ...

Rocky
Rocky86
 
Posts: 8
Joined: Jun 28, 2012 3:17 am

Re: Customization of status values

Postby Rocky86 » Jun 28, 2012 3:36 am

Hello again,

From where you are using the status color codes?

Regards,

Rocky
Rocky86
 
Posts: 8
Joined: Jun 28, 2012 3:17 am

Re: Customization of status values

Postby Rocky86 » Jul 09, 2012 6:42 am

Hello,

Could anyone please answer my questions??

I really need that and I am not able to do it alone ...

Regards,

Rocky
Rocky86
 
Posts: 8
Joined: Jun 28, 2012 3:17 am

Re: Customization of status values

Postby pay2play » Jul 11, 2012 2:26 pm

The status color codes are set to their default in config_defaults_inc:

$g_status_colors = array( 'new' => '#fcbdbd', // red (scarlet red #ef2929)
'feedback' => '#e3b7eb', // purple (plum #75507b)
'acknowledged' => '#ffcd85', // orange (orango #f57900)
'confirmed' => '#fff494', // yellow (butter #fce94f)
'assigned' => '#c2dfff', // blue (sky blue #729fcf)
'resolved' => '#d2f5b0', // green (chameleon #8ae234)
'closed' => '#c9ccc4'); // grey (aluminum #babdb6)

Use your config_inc file to change the status colors to your preference.
pay2play
 
Posts: 13
Joined: Jun 01, 2012 3:57 pm


Return to Customizations

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

cron