Severity (Auswirkung) ändern und auf 4 reduzieren

Deutschsprachiges Forum für Diskussionen und Fragen zu MantisBT

Moderators: Developer, Contributor

Post Reply
stef-lhm11
Posts: 55
Joined: 28 Aug 2013, 12:32

Severity (Auswirkung) ändern und auf 4 reduzieren

Post by stef-lhm11 »

ich benutze 1.2.15 und hab die notwendigen Dateien angepasst, um die "Auswirkung" (hab es in Severity umbenannt) zu ändern.

hab in mantis/core/constant_inc.php die vier überflüßigen Einträge auskommentiert.
# severity
# define( 'FEATURE', 10 );
define( 'TRIVIAL', 20 );
# define( 'TEXT', 30 );
define( 'TWEAK', 40 );
# define( 'MINOR', 50 );
define( 'MAJOR', 60 );
# define( 'CRASH', 70 );
define( 'BLOCK', 80 );

in der config_inc.php diese Zeilen angefügt:
* @global string $g_severity_enum_string
*/
$g_severity_enum_string = '20:trivial,40:tweak,60:major,80:block';
und in der lang/strings_german.txt eingetragen
$s_severity_enum_string = '20:SEV IV,40:SEV III,60:SEV II,80:SEV I';
hatte statt römischen Ziffern auch schon 1, 2, 3, 4 stehen.
die "Eintrag erfassen" Seite bringt mir aber immer:
APPLICATION ERROR #203

Eine Zahl wurde für severity erwartet.

was muss ich noch tun?
atrol
Site Admin
Posts: 8376
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Severity (Auswirkung) ändern und auf 4 reduzieren

Post by atrol »

Ich würde zunächst alle Änderungen rückgängig machen.
Die Konfiguration von MantisBT sollte nie erfolgen indem man Dateien ändert, die mit MantisBT ausgeliefert werden. Es ist auch in den seltensten Fällen notwendig.
Spätestens beim nächsten Update bekommt man vermeidbare Probleme.

Hier steht's wie es richtig funktioniert anhand eines Beispiels für die verschiedenen Zugriffsgruppen.
Für die Auswirkungen funktionier es entsprechend
http://www.mantisbt.org/docs/master-1.2 ... MIZE.ENUMS
How can they be customised? Let say we want to remove access level "Updater" and add access level "Senior Developer".

The file custom_constants_inc.php is supported for the exclusive purpose of allowing administrators to define their own constants while maintaining a simple upgrade path for future releases of MantisBT. Note that this file is not distributed with MantisBT and you will need to create it if you need such customisation. In our example, we need to define a constant for the new access level.

define ( 'SENIOR_DEVELOPER', 60 );

In config_inc.php

// Remove Updater and add Senior Developer
$g_access_levels_enum_string =
'10:viewer,25:reporter,55:developer,60:senior_developer,70:manager,90:administrator';
// Give access to Senior developers to create/delete custom field.
$g_manage_custom_fields_threshold = SENIOR_DEVELOPER;

The file custom_strings_inc.php is introduced for a similar reason to that of custom_constants_inc.php, which is to define custom strings. The advantage of defining them here is to provide a simple upgrade path, and avoid having to re-do the changes when upgrading to the next MantisBT release. Note that you will need to create this file if you need such customisation. The file is automatically detected and included by MantisBT code.

# Note that we don't have to remove the Updater entry from the
localisation file if the current language is 'english' ) {
$s_access_levels_enum_string =
'10:Betrachter,25:Reporter,40:Updater,55:Entwickler,60:Senior
Developer,70:Manager,90:Administrator'; }
d.h. Änderungen finden in den Dateien custom_constants_inc.php (hier nicht notwendig), config_inc.php und custom_strings_inc.php statt.
Please use Search before posting and read the Manual
stef-lhm11
Posts: 55
Joined: 28 Aug 2013, 12:32

Re: Severity (Auswirkung) ändern und auf 4 reduzieren

Post by stef-lhm11 »

Hab die Lösung gleich gefunden.
Die Beschreibung zur Änderunge der Severity ist richtig, aber wenn man die vordefinierte Auswahl an Sevs reduziert, muss man aufpassen.
Entfernt man einen Sev, der zufällig auch dem $g_default_bug_severity entspricht, so muss man den Wert hier natürlich auch ändern.
Sollte man vll noch in die Schritte mit aufnehmen, sonst bekommt man applikation error 203.

danke trotzdem
Post Reply