相信大家在使用mantis的时候,有时候会对它给与的流程状态感觉不适应,或者可以说很生硬,没有关系,以下篇章例子说明如何自定义自己的流程状态。其实步骤很简单,可以说是三部曲。
第一步:在mantis根目录下创建一个custom_contant_inc.php文件,在里面加上如下语句;
#-----------define my custom status value(定义自定义状态值)--------------
define ( 'Pretest', 60 );
?>
第二步:在mantis根目录下创建custom_strings_inc.php文件,里面添加以下语句;
#------------------- Define the language strings(定义状态语言) ----------------------------
if ( lang_get_current() == 'chinese_simplified' ) {
$s_status_enum_string = '10:新建,20:打回,30:公认,40:已确认,50:已分派,60:预测试,80:已解决,90:已关闭';
} else {
$s_status_enum_string =
'10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,
60:pretest,80:resolved,90:closed';
}
$s_pretest_bug_button = "Issue Ready to Pretest";
$s_pretest_bug_title = "Set Issue Ready to Pretest";
$s_email_notification_title_for_status_bug_to_be_tested =
"The following issue is ready TO BE PRETESTED.";
?>
第三步:修改你的config_inc.php, 用于适配自定义状态,添加以下语句,为了防止混乱,可添加至文件最后。
#----------2006-8-20 xixi add --------------------------------
#--------- Define new work flow for custom status-------------
$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned, 60:pretest,80:resolved,90:closed';
# Status color additions
$g_status_colors['pretest'] = '#ACE7AE';
$g_status_enum_workflow[NEW_]= '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:pretest';
$g_status_enum_workflow[FEEDBACK] = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:pretest';
$g_status_enum_workflow[ACKNOWLEDGED] = '20:feedback,30:acknowledged,40:confirmed,50:assigned,60:pretest';
$g_status_enum_workflow[CONFIRMED] ='20:feedback,40:confirmed,50:assigned,60:pretest';
$g_status_enum_workflow[ASSIGNED] = '20:feedback,50:assigned,60:pretest,90:closed';
$g_status_enum_workflow[PRETEST] = '10:new,20:feedback,50:assigned,60:pretest,80:resolved,90:closed';
$g_status_enum_workflow[RESOLVED] = '50:assigned,60:pretest,80:resolved,90:closed';
$g_status_enum_workflow[CLOSED] = '50:assigned,90:closed';
按照以上三步走就可以了,这时候你可以看到自己的issue状态有了一个新面孔哦,不错吧,自己来试试吧!!
来自:http://blog.csdn.net/fengyedqg/article/details/6536774
第一步:在mantis根目录下创建一个custom_contant_inc.php文件,在里面加上如下语句;
#-----------define my custom status value(定义自定义状态值)--------------
define ( 'Pretest', 60 );
?>
第二步:在mantis根目录下创建custom_strings_inc.php文件,里面添加以下语句;
#------------------- Define the language strings(定义状态语言) ----------------------------
if ( lang_get_current() == 'chinese_simplified' ) {
$s_status_enum_string = '10:新建,20:打回,30:公认,40:已确认,50:已分派,60:预测试,80:已解决,90:已关闭';
} else {
$s_status_enum_string =
'10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,
60:pretest,80:resolved,90:closed';
}
$s_pretest_bug_button = "Issue Ready to Pretest";
$s_pretest_bug_title = "Set Issue Ready to Pretest";
$s_email_notification_title_for_status_bug_to_be_tested =
"The following issue is ready TO BE PRETESTED.";
?>
第三步:修改你的config_inc.php, 用于适配自定义状态,添加以下语句,为了防止混乱,可添加至文件最后。
#----------2006-8-20 xixi add --------------------------------
#--------- Define new work flow for custom status-------------
$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned, 60:pretest,80:resolved,90:closed';
# Status color additions
$g_status_colors['pretest'] = '#ACE7AE';
$g_status_enum_workflow[NEW_]= '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:pretest';
$g_status_enum_workflow[FEEDBACK] = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:pretest';
$g_status_enum_workflow[ACKNOWLEDGED] = '20:feedback,30:acknowledged,40:confirmed,50:assigned,60:pretest';
$g_status_enum_workflow[CONFIRMED] ='20:feedback,40:confirmed,50:assigned,60:pretest';
$g_status_enum_workflow[ASSIGNED] = '20:feedback,50:assigned,60:pretest,90:closed';
$g_status_enum_workflow[PRETEST] = '10:new,20:feedback,50:assigned,60:pretest,80:resolved,90:closed';
$g_status_enum_workflow[RESOLVED] = '50:assigned,60:pretest,80:resolved,90:closed';
$g_status_enum_workflow[CLOSED] = '50:assigned,90:closed';
按照以上三步走就可以了,这时候你可以看到自己的issue状态有了一个新面孔哦,不错吧,自己来试试吧!!
来自:http://blog.csdn.net/fengyedqg/article/details/6536774
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/6543/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
评论列表