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: ce6d92d
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d598542
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on May 21, 2012

  1. Copy the full SHA
    4799c3e 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
    79c7bd5 View commit details
  3. Copy the full SHA
    d598542 View commit details
Showing with 216 additions and 131 deletions.
  1. +96 −62 docbook/Admin_Guide/en-US/Customizing.xml
  2. +48 −41 docbook/Admin_Guide/en-US/Installation.xml
  3. +72 −28 docbook/Admin_Guide/en-US/Workflow.xml
158 changes: 96 additions & 62 deletions docbook/Admin_Guide/en-US/Customizing.xml
Original file line number Diff line number Diff line change
@@ -659,78 +659,112 @@ functions section.</para>

<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>

<para>To add a status:
<para>This section describes how to add a custom 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>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 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 language="PHP (HTML)">&lt;?php if ( lang_get_current() == 'german' ) {
$s_status_enum_string = '10:neu,20:Rückmeldung,30:anerkannt,40:bestä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>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() ) {

french:
$s_status_enum_string = '10:nouveau,20:commentaire,30:accepté,40:confirmé,50:affecté,60:à tester,80:résolu,90:fermé';

$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êt à ê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>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>Add the new status to the workflow as required.
</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>This can either be done from the
Manage Workflow Transitions page
(see <xref linkend="admin.lifecycle.workflow.transitions" />)
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>
89 changes: 48 additions & 41 deletions docbook/Admin_Guide/en-US/Installation.xml
Original file line number Diff line number Diff line change
@@ -66,60 +66,64 @@

<orderedlist>
<listitem>
<para>First, transfer the 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>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
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 configuration file. From your web server, access
http://yoursite/mantisbt/admin/install.php. This page will walk through
the following steps:
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 installation, 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 are also 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>
@@ -133,37 +137,40 @@
</listitem>
<listitem>
<para>The next part involves configuring the installation to
work with your specific setup. Open the file in an editor and add
any other values that are required. There are many more that you can
use to customize your MantisBT installation.
See <xref linkend="admin.config" /> 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
<xref linkend="admin.config" /> 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_globals incorrectly.
Create a page with this line in it: &lt;? phpinfo() ?&gt;, save
it with a .php extension and load it up in your web browser. It
will, among a multitude of other things, have the correct value of
register_globals that you are 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
<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.Documentation can be found at:
http://www.php.net/manual/en/installation.php
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>
Loading