Workflow validation for new status on different projects.

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
mmetan
Posts: 17
Joined: 15 Sep 2008, 10:45

Workflow validation for new status on different projects.

Post by mmetan »

Hello all...

I ve been successfully add a new status which is "Ready to Commit". New status works perfectly for one project. In my mantis there are 3 different projects. The "Ready To Commit" state works for just one project but it doesn't works for others. For other projects it returns a "Workflow Validation" on workflow transitions page. It says "Ready to Commit: You cannot move an issue into this status". Ive checked the flow and other things but it doesn't seems to be solved from the administrator gui. Any helps are highly appreciated. I'm including the following information about my new status:

config_defaults_inc.php
Updated the following line in Mantis Enum Strings part

Code: Select all

$g_status_enum_string = '10:initiated,20:Assigned Open,30:Not A Bug,40:Need Info,50:Change Assignee,60:Ready To Verify,65:Ready To Commit,70:Can_Not_Be_Reproduced,80:Deferred,90:Closed';

config_inc.php

Code: Select all

<?php
require_once('custom_config_inc.php');
?>

custom_config_inc.php

Code: Select all

<?php

#connection parameters
$g_hostname,$g_db_type etc etc....


#customize status
g_status_enum_string = '10:initiated,20:Assigned Open,30:Not A Bug,40:Need Info,50:Change Assignee,60:Ready To Verify,65:Ready To Commit,70:Can_Not_Be_Reproduced,80:Deferred,90:Closed';

#customize status color
$g_status_colors['Ready To Commit'] = '#FB8FF00';

?>

custom_constant_inc.php

Code: Select all

<?php

#customized new status
define('READYTOCOMMIT',65);

?>

custom_strings_inc.php

Code: Select all

<?php

#customize workflow status
g_status_enum_string = '10:initiated,20:Assigned Open,30:Not A Bug,40:Need Info,50:Change Assignee,60:Ready To Verify,65:Ready To Commit,70:Can_Not_Be_Reproduced,80:Deferred,90:Closed';

#customize status ready to commit
$s_email_nodification_title_for_status_bug_ready_to_commit = 'The following issue is READY TO BE COMMITTED';
$s_ready_to_commit_bug_button = "Ready To Commit";
$s_ready_to_commit_bug_title = "Ready To Commit";


?>

PLUS; I've also successfully modified the "strings_english.txt" file about bug buttons and titles. My new status works perfectly for one project. I'm using and have to use version 1.0.6 by the way.
mmetan
Posts: 17
Joined: 15 Sep 2008, 10:45

Re: Workflow validation for new status on different projects.

Post by mmetan »

Is this a bug? Can anyone help me please?

any helps are highly appreciated.
autra
Posts: 21
Joined: 25 Aug 2008, 09:40

Re: Workflow validation for new status on different projects.

Post by autra »

It seems that you have some specific project settings...

Go to config report, and delete all options called status_enum_workflow, . Then be sure that all projects is selected on top right of your page and redefine your workflow.

Or you can identify the wrong setting in config report.

By the way, you shouldn't modify strings_english.txt but you'd better create a custom_strings_inc.php with something like following if you have various languages to modify.
if ( lang_get_current() == 'english' ) {
your $s variable here
}
So the custom_strings_inc.php is ok, you don't need to modify strings_english.txt.

In fact, config_inc.php override config_defaults_inc.php. So you should'nt modify config_defaults_inc.php, but you'd better make all your custom config in config_inc.php. And custom_config_inc.php is not necessary.

These recommandations are helpful to make further update easier.

Nevertheless, all your modifications should work fine.

Hope this will help
mmetan
Posts: 17
Joined: 15 Sep 2008, 10:45

Re: Workflow validation for new status on different projects.

Post by mmetan »

Go to config report, and delete all options called status_enum_workflow, . Then be sure that all projects is selected on top right of your page and redefine your workflow.

Or you can identify the wrong setting in config report.
What is config report? I ve no such php file neither an administrator option like that in mantis (1.0.6).

I ve edited the workflow configuration from Manage Configuration -> Workflow Transitions page. When I select "All Projects" option, i recieve the workflow validation message for my new status.

I'vent edited workflows by code (status_enum_workflow). May be I have to? I guessed it would be more effective to do it from the admin gui end.

Thanx for your help man its highly appreciated. Waiting for reply.
mmetan
Posts: 17
Joined: 15 Sep 2008, 10:45

Re: Workflow validation for new status on different projects.

Post by mmetan »

By the way, you shouldn't modify strings_english.txt but you'd better create a custom_strings_inc.php with something like following if you have various languages to modify.
if ( lang_get_current() == 'english' ) {
your $s variable here
}
So the custom_strings_inc.php is ok, you don't need to modify strings_english.txt.

In fact, config_inc.php override config_defaults_inc.php. So you should'nt modify config_defaults_inc.php, but you'd better make all your custom config in config_inc.php. And custom_config_inc.php is not necessary.

Plus If i do such changes like you said, i dont see my new status, it says @65@ for name and gives an error message saying Ready_To_Commit but button not found. mantis sux on that way :) you have to tell everything in almost every file to make it understand :)
Post Reply