Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d116518
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c712de9
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on May 21, 2012

  1. Copy the full SHA
    761a2d6 View commit details
  2. Documentation: revised Admin Guide / Custom Status

    Fixed layout of 'programlisting' sections, introducing newlines to make
    code more clear and readable. Improved definition of translations for
    custom statuses.
    
    Fixes #14279
    dregad committed May 21, 2012
    Copy the full SHA
    444db8d View commit details
  3. Copy the full SHA
    c712de9 View commit details
Showing with 249 additions and 161 deletions.
  1. +115 −79 docbook/adminguide/en/customizing_mantis.sgml
  2. +55 −46 docbook/adminguide/en/installation.sgml
  3. +79 −36 docbook/adminguide/en/workflow.sgml
194 changes: 115 additions & 79 deletions docbook/adminguide/en/customizing_mantis.sgml
Original file line number Diff line number Diff line change
@@ -657,86 +657,122 @@ functions section.</para>
</para>
</section>

<section id="admin.customize.status">
<title>Customizing Status Values</title>
<para>The default is no workflow, where all states
are accessible from any others. The following example can be
transferred to config_inc.php. The workflow needs to have a path
from the statuses greater than or equal to the resolved state back
to the feedback state. Otherwise, the re-open operation won't work.
<programlisting>$g_status_enum_workflow[NEW_]=
'10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved';
$g_status_enum_workflow[FEEDBACK] =
'10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved';
$g_status_enum_workflow[ACKNOWLEDGED] =
'20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved';
$g_status_enum_workflow[CONFIRMED] =
'20:feedback,40:confirmed,50:assigned,80:resolved';
$g_status_enum_workflow[ASSIGNED] =
'20:feedback,50:assigned,80:resolved,90:closed';
$g_status_enum_workflow[RESOLVED] =
'50:assigned,80:resolved,90:closed';
$g_status_enum_workflow[CLOSED] = '50:assigned';
</programlisting>
</para>
<section id="admin.customize.status">
<title>Customizing Status Values</title>

<para>This section describes how to add a custom status.
<orderedlist>
<listitem>
<para>Define a constant to map the new status to.</para>
<para>In the main mantisbt directory, locate and edit file
<emphasis>custom_constants_inc.php</emphasis>;
(create it if it does not exist)
<programlisting>
&lt;?php
# Custom status code
define( 'TESTING', 60 );
</programlisting>
</para>
</listitem>

<listitem>
<para>Define the new status in the enumeration, as well as
the corresponding color code.
</para>
<para>In the main mantisbt directory, edit your
<emphasis>config_inc.php</emphasis>

<programlisting>
# Revised enum string with new 'testing' status
$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,<emphasis>60:testing,</emphasis>80:resolved,90:closed';

# Status color additions
$g_status_colors['<emphasis>testing</emphasis>'] = '#ACE7AE';
</programlisting>
Note that the key in the $g_status_colors array must be
equal to the value defined for the new status code in
$g_status_enum_string.
</para>
</listitem>

<listitem>
<para>Define the required translation strings for the new
status, for each language used in the installation.
<itemizedlist>
<listitem><para><emphasis>s_status_enum_string</emphasis>:
status codes translation (refer to the original
language strings for standard values)
</para></listitem>
<listitem><para><emphasis>s_XXXX_bug_title</emphasis>:
title displayed in the change status page
</para></listitem>
<listitem><para><emphasis>s_XXXX_bug_button</emphasis>:
label for the submit button in the change status page
</para></listitem>
<listitem><para><emphasis>s_email_notification_title_for_status_bug_XXXX</emphasis>:
title for notification e-mails
</para></listitem>
</itemizedlist>
where XXXX is the name of the new status as it was defined
in <emphasis>g_status_enum_string</emphasis> above. If
XXXX contains spaces, they should be replaced by
underscores in the language strings names (e.g.
for '35:pending user', use '$s_pending_user_bug_button')
</para>
<para>In the main mantisbt directory, locate and edit file
<emphasis>custom_strings_inc.php</emphasis>;
(create it if it does not exist)
<programlisting>
&lt;?php
# Translation for Custom Status Code: <emphasis>testing</emphasis>
switch( lang_get_current() ) {

<para>To add a status:
<orderedlist>
<listitem>
<para>Define a constant to map the new status to.In a new file
custom_constants_inc.php in the main mantisbt directory:
<programlisting>&lt;?php define ( 'TEST', 60 ); ?&gt;</programlisting>
</para>
</listitem>
<listitem>
<para>Define the language strings required. This may need to be
defined in several languages.In a new file custom_strings_inc.php
in the main mantisbt directory:
<programlisting>&lt;?php if ( lang_get_current() == 'german' ) {
$s_status_enum_string =
'10:neu,20:R&cedil;ckmeldung,30:anerkannt,40:best&permil;tigt,50:zugewiesen,
60:zu testen,80:behoben,90:geschlossen'; } else {
$s_status_enum_string =
'10:new,20:feedback,30:acknowledged,40:confirmed,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."; } ?&gt;
</programlisting>
</para>
</listitem>
<listitem>
<para>Define any configurations required.In the existing file
config_inc.php in the main mantisbt directory:
<programlisting>$g_status_enum_string =
'10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned, 60:to
be tested,80:resolved,90:closed'; # Status color additions
$g_status_colors['to be tested'] = '#ACE7AE';
</programlisting>
</para>
</listitem>
<listitem>
<para>Add the status to any workflow defined.In config_inc.php:
<programlisting>$g_status_enum_workflow[NEW_]=
'10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:to
be tested'; $g_status_enum_workflow[FEEDBACK] =
'10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:to
be tested'; $g_status_enum_workflow[ACKNOWLEDGED] =
'20:feedback,30:acknowledged,40:confi rmed,50:assigned,60:to be
tested'; $g_status_enum_workflow[CONFIRMED] =
'20:feedback,40:confirmed,50:assigned,60:to be tested';
$g_status_enum_workflow[ASSIGNED] = '20:feedback,50:assigned,60:to
be tested,90:closed'; $g_status_enum_workflow[TEST] =
'10:new,20:feedback,50:assigned,60:to be
tested,80:resolved,90:closed'; $g_status_enum_workflow[RESOLVED] =
'50:assigned,60:to be tested,80:resolved,90:closed';
$g_status_enum_workflow[CLOSED] = '50:assigned,90:closed';
</programlisting>
</para>
</listitem>
</orderedlist>
</para>
</section>
french:
$s_status_enum_string = '10:nouveau,20:commentaire,30:accept&eacute;,40:confirm&eacute;,50:affect&eacute;,60:&agrave; tester,80:r&eacute;solu,90:ferm&eacute;';

$s_testing_bug_title = 'Mettre le bogue en test';
$s_testing_bug_button = 'A tester';

$s_email_notification_title_for_status_bug_testing = 'Le bogue suivant est pr&ecirc;t &agrave; &ecirc;tre TESTE.';
;;

default: # english
$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:testing,80:resolved,90:closed';

$s_testing_bug_title = 'Mark issue Ready for Testing';
$s_testing_bug_button = 'Ready for Testing';

$s_email_notification_title_for_status_bug_testing = 'The following issue is ready for TESTING.';
}
</programlisting>
</para>
</listitem>

<listitem>
<para>Add the new status to the workflow as required.
</para>
<para>This can either be done from the
<link linkend="admin.lifecycle.workflow.transitions">
Manage Workflow Transitions page
</link>
or by manually editing <emphasis>config_inc.php</emphasis>
as per the example below:

<programlisting>
$g_status_enum_workflow[NEW_] ='30:acknowledged,20:feedback,40:confirmed,50:assigned,80:resolved';
$g_status_enum_workflow[FEEDBACK] ='30:acknowledged,40:confirmed,50:assigned,80:resolved';
$g_status_enum_workflow[ACKNOWLEDGED] ='40:confirmed,20:feedback,50:assigned,80:resolved';
$g_status_enum_workflow[CONFIRMED] ='50:assigned,20:feedback,30:acknowledged,80:resolved';
$g_status_enum_workflow[ASSIGNED] ='60:testing,20:feedback,30:acknowledged,40:confirmed,80:resolved';
$g_status_enum_workflow[TESTING] ='80:resolved,20:feedback,50:assigned';
$g_status_enum_workflow[RESOLVED] ='90:closed,20:feedback,50:assigned';
$g_status_enum_workflow[CLOSED] ='20:feedback,50:assigned';
</programlisting>
</para>
</listitem>
</orderedlist>
</para>
</section>

<section id="admin.customize.customfuncs">
<title>Custom Functions</title>
101 changes: 55 additions & 46 deletions docbook/adminguide/en/installation.sgml
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@

<orderedlist>
<listitem>
<para>Tranfer files</para>
<para>Transfer files</para>
</listitem>
<listitem>
<para>Uncompress files</para>
@@ -62,60 +62,64 @@

<orderedlist>
<listitem>
<para>First, transfer the file to your webserver using whatever
method you likebest (ftp, scp, etc). You will need to telnet/ssh
into the server machine forthe next steps.
<para>First, transfer the downloaded file to your webserver
using whatever method you like best (ftp, scp, etc). You
will need to telnet/ssh into the server machine for the
next steps.
</para>
</listitem>
<listitem>
<para>Next, untar/gunzip it to the directory that you want.The
usual command is (1 step):
tar zxvf &lt;filename.tar.gz&gt;
<programlisting>tar -xzf <emphasis>filename.tar.gz</emphasis></programlisting>
OR (2 steps):
gunzip &lt;filename.tar.gz&gt; tar xvf &lt;filename.tar&gt;
<programlisting>
gunzip <emphasis>filename.tar.gz</emphasis>
tar -xf <emphasis>filename.tar</emphasis>
</programlisting>
Winzip, Stuffit, and other programs should also be able to
handledecompression of the archive.At this point you may want to
handle decompression of the archive. At this point you may want to
rename the directory to something simpler like 'mantisbt'. You will
use the mv command to rename a directory (Windows users substitute
the "ren" command or use explorer).
mv &lt;directoryname&gt; mantisbt
<programlisting>mv <emphasis>directoryname</emphasis> mantisbt</programlisting>
</para>
</listitem>
<listitem>
<para>Next we will create the necessary database tables and a
basic configurationfile.From your web server, access
http://yoursite/mantisbt/admin/install.php. This page will walk through
the following steps:
<para>Next we will create the necessary database tables and a
basic configuration file. From your web browser, access
</para>
<programlisting>http://yoursite/mantisbt/admin/install.php</programlisting>
<para>This page will walk you through the following steps:

<orderedlist>
<listitem>
<para>check basic parameters for the web server</para>
</listitem>
<listitem>
<para>prompt for the database type and location, and a database
user/passwordpair. For installion, an administrative user/password
pair can also be provided. The operating user requires SELECT,
INSERT, UPDATE, and DELETE privileges. For installation, INDEX,
CREATE, ALTER, and DROP privileges arealso required.
user/password pair. For installation, a high-privileged account
can also be provided. If unspecified, the database user will be
used.
The database user requires SELECT, INSERT, UPDATE, and DELETE privileges.
For installation, additional INDEX, CREATE, ALTER, and DROP privileges
are also required.
</para>
</listitem>
<listitem>
<para>create the database and tables.
WARNING: A DEFAULT ADMINISTRATOR level account is created. The
account name and password are administrator / root.
Use this when you first login to MantisBT. Immediately go to Manage
and create at least one administrator level account. Immediately
after that DISABLE or DELETE the administrator account. You can
recreate it but you should delete the account to prevent the
cookie_string from being used to trick the package. It would be
even better to rename the account or delete it permanently.
REMEMBER: After setting up the package, REMOVE the default
administrator account.
WARNING: a default Administrator user account
is created at this stage, to allow the initial login
and setup of MantisBT.
The id and password are <emphasis>administrator / root</emphasis>.
You should immediately go to Manage Users,
and create another administrator level account,
then either DISABLE or DELETE the default one.
</para>
</listitem>
<listitem>
<para>write a basic "config_inc.php file to define the
database.
database connection parameters.
</para>
</listitem>
<listitem>
@@ -129,40 +133,45 @@
</listitem>
<listitem>
<para>The next part involves configuring the installation to
work with yourspecific setup.Open the file in an editor and add
anyother values that are required. There aremany more that you can
use to customize your MantisBT installation.
See <link linkend="admin.config">Configuration</link> for
in depth explanations.The file will overwrite the default values
with those necessary for setup.You can load up admin/check.php to
see if you set things up correctly.
work with your specific setup. There are many options that
you can set to customize your MantisBT installation. See
<link linkend="admin.config">Configuration</link> for
in depth explanations.
</para>
<para>Open the file <emphasis>config_inc.php</emphasis> in an
editor and add any values that are required. These will
override the default values.
</para>
<para>You can load up admin/check.php to validate if you set
things up correctly.
NOTE: check.php sometimes reports the value of
register_globalsincorrectly.
Create a page with this line in it: &lt;? phpinfo() ?&gt;, save
itwith a .php extension and load it up in your web browser. It
will, among amultitude of other things, have the correct value of
register_globals that youare using.
<emphasis>register_globals</emphasis> incorrectly. To
confirm the correct value,
Create a page with this line in it:
<programlisting>&lt;?php phpinfo(); ?&gt;</programlisting>
save it with a .php extension and load it up in your web browser.
</para>
</listitem>

<listitem>
<para>MantisBT now uses only .php files.If your webserver is
configured for other extensions (.PHP3, .PHTML) then youwill have
to have the administrator add support for .PHP files. This shouldbe
a trivial modification.Documentation can be found at:
http://www.php.net/manual/en/installation.php
<para>MantisBT uses only <emphasis>.php</emphasis> files. If your webserver is
configured for other extensions (.PHP3, .PHTML) then you will have
to have the administrator add support for .PHP files. This should be
a trivial modification. Further details can be found in the
<ulink url="http://www.php.net/manual/en/installation.php">PHP documentation</ulink>
</para>
</listitem>

<listitem>
<para>Login to your bugtracker and go to the manage section.
Click on the projects link. You will need to ADD a new project. Then
EDIT the new project and remember to ADD at least one category.
Otherwise you won't be able to add any issues. That should be
it. You're off and running.
Otherwise you won't be able to add any issues.
</para>
</listitem>
</orderedlist>
<para>That should be it. You're off and running.
</para>

</section>

Loading