Status und Lösung - welche Verbindung?

Deutschsprachiges Forum für Diskussionen und Fragen zu MantisBT

Moderators: Developer, Contributor

Post Reply
Fabian
Posts: 2
Joined: 02 Mar 2020, 14:26

Status und Lösung - welche Verbindung?

Post by Fabian »

Hallo,

ich würde gerne den Status und die Lösung textmäßig zu unseren Zwecken anpassen wollen.
Nun habe ich festgestellt, dass es zwischen "status" und "resolution" eine Verbindung gibt. So kann z.B. wenn der Status achnowledged ist, die Resolution nicht reopened sein. Es kommt:

Code: Select all

APPLICATION ERROR #24

Resolution "reopened" is not allowed for status "acknowledged".
Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
Da ich wie gesagt die Texte etwas anpassen möchte, ergibt nun dieses Beispiel vielleicht kein Sinn.
Ich möchte nur den Zusammenhang zwischen diesen beiden Feldern verstehen. So kann ich das entsprechend ändern.

Herzlichen Dank.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Status und Lösung - welche Verbindung?

Post by atrol »

Ist nicht ganz einach und kann je nach Setting der daran beteiligten Optionen sehr verwirrend sein.
Hier ein Auszug der wesentlichen Codeteile aus bug_update.php

Code: Select all

...
$t_reopen_resolution = config_get( 'bug_reopen_resolution' );
...
# Don't allow changing the Resolution in the following cases:
# - new status < RESOLVED and resolution denoting completion (>= fixed_threshold)
# - new status >= RESOLVED and resolution < fixed_threshold
# - resolution = REOPENED and current status < RESOLVED and new status >= RESOLVED
# Refer to #15653 for further details (particularly note 37180)
$t_resolution_fixed_threshold = config_get( 'bug_resolution_fixed_threshold' );
if( $t_existing_bug->resolution != $t_updated_bug->resolution && (
	   (  $t_updated_bug->resolution >= $t_resolution_fixed_threshold
	   && $t_updated_bug->resolution != $t_reopen_resolution
	   && $t_updated_bug->status < $t_resolved_status
	   )
	|| (  $t_updated_bug->resolution == $t_reopen_resolution
	   && (  $t_existing_bug->status < $t_resolved_status
		  || $t_updated_bug->status >= $t_resolved_status
	   ) )
	|| (  $t_updated_bug->resolution < $t_resolution_fixed_threshold
	   && $t_updated_bug->status >= $t_resolved_status
	   )
) ) {
	error_parameters(
		get_enum_element( 'resolution', $t_updated_bug->resolution ),
		get_enum_element( 'status', $t_updated_bug->status )
	);
	trigger_error( ERROR_INVALID_RESOLUTION, ERROR );
}
Please use Search before posting and read the Manual
Fabian
Posts: 2
Joined: 02 Mar 2020, 14:26

Re: Status und Lösung - welche Verbindung?

Post by Fabian »

Hallo atrol,

herzlichen Dank. Das hilft mir mal weiter.
Zur not kommentier ich den ganzen Block aus.
Post Reply