mantis

更新时间:2023-01-02 13:53:24 阅读: 评论:0


2023年1月2日发(作者:幼儿瑜伽)

mantis配置

__IZP__李东

一、汉化:修改mantis目录中的config_defaults_里

$g_default_language='chine_simplified';

二、整合:修改testlink/cfg/,样例如下:

1、<?php

/**

*TestLinkOpenSourceProject-/

*$Id:,v1.72007/03/0518:22:04franciscomExp$

*

*ConstantsudthroughoutTestLinkaredefinedwithinthisfile

*theyshouldbechangedforyourenvironment

*

*20051229-scs-addedDEFINEfortheDB-Type

*/

//SetthebugtrackingsystemInterfacetoMANTIS0.19.1

//alsotestedwithMANTIS1.0.0.a3

/**TheDBhosttouwhenconnectingtothemantisdb*/

define('BUG_TRACK_DB_HOST','localhost');注解:访问主机

/**Thenameofthedatabathatcontainsthemantistables*/

define('BUG_TRACK_DB_NAME','bugtracker');注解:访问数据库名

/**TheDBtypebeingudbymantis

values:mysql,mssql,postgres

*/

define('BUG_TRACK_DB_TYPE','mysql');注解:访问数据库类型

/**TheDBpasswordtouforconnectingtothemantisdb*/

define('BUG_TRACK_DB_USER','root');注解:数据库用户名

define('BUG_TRACK_DB_PASS','');注解:数据库密码

/*linkofthewebrverformantis*/

/*anonymousloginintomantishastobeturnedon,andamantis

urhastocreatedwithviewerrightstoallpublicprojects

/*Changethefollowinginyourmantisconfig_(replace

dummywithyourcreatedur)

#---anonymouslogin-----------

#Allowanonymouslogin

$g_allow_anonymous_login=ON;注解:是否开启匿名访

$g_anonymous_account='dummy';注解:匿名用户名,暂

是无效

*/

define('BUG_TRACK_HREF',

"192.168.70.61/mantis/?id=");注解:

/**linktothebugtrackingsystem,forenteringnewbugs*/

define('BUG_TRACK_ENTER_BUG_HREF',"192.168.70.61/ma

ntis");注解:testlink提交bug访问mantis地址

三、mantis邮件配置

config_defaults_中找到。

建议把该内容拷到config_中.

##MantisEmailSettings

##---emailvariables-------------

$g_administrator_email='xxxx@';#xxxx@是要修改为

相应的邮箱名称。

$g_webmaster_email='xxxx@';#xxxx@是要修改

为相应的邮箱名称。

#the'From:'fieldinemails

$g_from_email='xxxx@';#xxxx@是要修改为相应

的邮箱名称。

#thereturnaddressforbouncedmail

$g_return_path_email='xxxx@';#xxxx@是要修改为

相应的邮箱名称。

#allowemailnotification

#notethatifthisisdisabled,sign-upandpasswordretmessageswill

#notbent.

$g_enable_email_notification=ON;

#lectthemethodtomailby:

#0-mail()

#1-ndmail

#2-SMTP

$g_phpMailer_method=2;#以smtp发送邮件

#ethephpMailer

scrīpt

#Nameofsmtphost,neededforphpMailer,

$g_smtp_host=':25';#邮件服务器的地址,后面加上端口

号25

#TheoptionsallowyoutouSMTPAuthenticationwhenyouua

remote

#_urnameisnot''thentheurname

#andpasswordwillbeudwhenloggingintotheSMTPrver.

$g_smtp_urname='xxxxx';#邮箱的用户名

$g_smtp_password='xxxxx';#邮箱的密码

邮件系统的配置建议用smtp方式。一般公司都有自己的邮件服务器,让管理员给你开

一个mantis的专用信箱。

注意:还需要配置一个地方,在C:xamppapacheconf目录下在找到,

打开后搜索到listen,把Listen80修改为listenIP:80,IP就是你服务器的地址。还

有修改,把SMTP=localhost修改为SMTP=IP,IP为你服务器IP

这样修改的好处是邮件发送的时候是直接以IP地址发送链接的,而不是以localhost

发送的。

四、Mantis平台WINDOWS配置手册(/)

下载(windows)集成了PHP、Apache、MySql,满

足了Mantis平台对PHP平台、服务器、数据库的需求。

五、

软件安装这里就不说了。

解压安装文件中

执行admin/

畅通无阻!

六、Mantis平台汉化:

修改mantis目录下面的config_defaults_文件中

$g_default_language='english';〉$g_default_language=

'chine_simplified_utf8';

config_中加入$g_default_language=

'chine_simplified_utf8';

汉化ok!

这个软件有多种语言选择的,你可以选择中文版的。

MyAccount-->Preferences-->Language.

七、中文编码集

TO:解决浏览器访问Mantis时中文字体乱码问题

修改Mantis中的默认配置文件config_defaults_,找到如下内容,对照修改.

如果把以下内容拷到config_中也可以.

配置文件加载顺序:先加载config_defaults_,后加载config_。

config_中的值会覆盖config_defaults_.

#MantisLanguageSettings

#---languagettings-----------

#Ifthelanguageistto'auto',theactual

#languageisdeterminedbytheuragent(webbrowr)

#languagedivference.

$g_default_language='chine_simplified_gb2312';

#listthechoicesthattheursareallowedtochoo

$g_language_choices_arr=array(

'auto',

'bulgarian',

'catalan',

'chine_simplified_gb2312',

'chine_traditional',

'croatian',

'czech',

'danish',

'dutch',

'english',

'estonian',

'finnish',

'french',

'german',

'hebrew',

'hungarian',

'icelandic',

'italian',

'japane',

'korean',

'latvian',

'lithuanian',

'norwegian',

'polish',

'portugue_brazil',

'portugue_standard',

'romanian',

'russian',

'rbian',

'slovak',

'slovene',

'spanish',

'swedish',

'turkish',

'ukrainian'

);

#Browrlanguagemappingfor'auto'languagelection

$g_language_auto_map=array(

'bg'=>'bulgarian',

'ca'=>'catalan',

'zh-cn,zh-sg,zh'=>'chine_simplified_gb2312',

'zh-hk,zh-tw'=>'chine_traditional',

'cs'=>'czech',

'da'=>'danish',

'nl-be,nl'=>'dutch',

'en-us,en-gb,en-au,en'=>'english',

'et'=>'estonian',

'fi'=>'finnish',

'fr-ca,fr-be,fr-ch,fr'=>'french',

'de-de,de-at,de-ch,de'=>'german',

'he'=>'hebrew',

'hu'=>'hungarian',

'hr'=>'croatian',

'is'=>'icelandic',

'it-ch,it'=>'italian',

'ja'=>'japane',

'ko'=>'korean',

'lt'=>'lithuanian',

'lv'=>'latvian',

'no'=>'norwegian',

'pl'=>'polish',

'pt-br'=>'portuge_brazil',

'pt'=>'portuge_standard',

'ro-mo,ro'=>'romanian',

'ru-mo,ru-ru,ru-ua,ru'=>'russian',

'sr'=>'rbian',

'sk'=>'slovak',

'sl'=>'slovene',

'es-mx,es-co,es-ar,es-cl,es-pr,es'=>'spanish',

'sv-fi,sv'=>'swedish',

'tr'=>'turkish',

'uk'=>'ukrainian'

);

#Fallbackforautomaticlanguagelection

$g_fallback_language='english';

八、邮件配置

TO:解决邮件发送问题

以下内容可以在config_defaults_中找到。

建议把该内容拷到config_中.

##MantisEmailSettings

##---emailvariables-------------

$g_administrator_email='testsrv@';

$g_webmaster_email='testsrv@';

#the'From:'fieldinemails

$g_from_email='testsrv@';

#thereturnaddressforbouncedmail

$g_return_path_email='testsrv@';

#allowemailnotification

#notethatifthisisdisabled,sign-upandpasswordretmessageswill

#notbent.

$g_enable_email_notification=ON;

#lectthemethodtomailby:

#0-mail()

#1-ndmail

#2-SMTP

$g_phpMailer_method=2;

#ethephpMailer

scrīpt

#Nameofsmtphost,neededforphpMailer,

$g_smtp_host='';

#TheoptionsallowyoutouSMTPAuthenticationwhenyouua

remote

#_urnameisnot''thentheurname

#andpasswordwillbeudwhenloggingintotheSMTPrver.

$g_smtp_urname='testsrv';

$g_smtp_password='testsrv';

九、图形报表

TO:解决图形报表中文字体输出问题.

在mantis1.1中,现在稍微简单一些,只要改个字体就可以。

打开coregraph_文件,找到如下内容,并添加一行:

functiongraph_get_font(){

$t_font_map=array(

'simsun'=>FF_SIMSUN,

'arial'=>FF_ARIAL,

'verdana'=>FF_VERDANA,

'courier'=>FF_COURIER,

'comic'=>FF_COMIC,

'times'=>FF_TIMES,

'georgia'=>FF_GEORGIA,

'trebuche'=>FF_TREBUCHE,

'vera'=>FF_VERA,

'veramono'=>FF_VERAMONO,

'verarif'=>FF_VERASERIF);

$t_font=config_get('graph_font','');

if(ist($t_font_map[$t_font])){

return$t_font_map[$t_font];

}el{

returnFF_FONT1;

}

另外注意config_或config_defaults_中应该有以下配置内容:

#MantisJPGRAPHAddon

#---jpgraphttings---

##InitialVersionfromDuncanList

##ToutheJpgraphaddonyouneedtheJPGRAPHpackagefrom

#/jpgraph/

#Youcanplacethepackagewhereeveryouwant,butyouhave

#.

#(DEFINE('DIR_BASE','/www/mantisbt/jpgraph/');)

$g_u_jpgraph=ON;

$g_jpgraph_path='D:/mantis-1.1.0a2/core/jpgraph/src'.

DIRECTORY_SEPARATOR.''.DIRECTORY_SEPARATOR;#dontforgetthe

endingslash!

#注意:这里需要指定的路径.页面出错时会有提示的.

#dvaluesare'arial','verdana',

'courier','book','comic','times',

#'georgia','trebuche','vera','veramono',or'verarif'.Refertothe

jpgraphmanualfordetails.

#NOTE:thefontsneedtobeinstalledintheTTF_DIRasspecifiedto

jpgraph

$g_graph_font='simsun';

#whatwidthisudtoscalethegraphs.

$g_graph_window_width=800;

#bargraphaspectration(height/width)

$g_graph_bar_aspect=0.9;

#howmanygraphstoputineachrowintheadvancedsummarypage

$g_graph_summary_graphs_per_row=2;

$g_system_font_folder='c:/winnt/fonts/';

$g_font_per_captcha='';

十、时区设置

TO:解决mantis页面时间显示问题,默认用的是GMT格林威治时间.与中国时间相差8

小时.

在config_或config_defaults_中添加以下内容:

#时区设置

putenv("TZ=Asia/Shanghai");

另外网上也有人提到在中进行如下设置。(如果putenv函数不起作用的话,

可以试下)

[Date]

;Definesthedefaulttimezoneudbythedatefunctions

ne=Asia/shanghai

十一、(Mysql)

版本:MySQL5.0系列

很多人用phpMyAdmin对mysql进行数据管理。

建议大家用MySQL-Front,我用的是3.2版。

图形化界面操作挺方便。

mantis中的数据源连接配置还是比较简单的,在config_中设置:

#MantisDatabaSettings

#---databavariables---------

#tthevaluestomatchyourtup

#hostnameshouldbeeitherahostnameorconnectionstringtosupply

toadodb.

#Forexample,ifyouwouldliketoconnecttoamysqlrveronthelocal

machine,

#thostnameto'localhost',anddb_typeto'mysql'.

#Ifyouneedtosupplyaporttoconnectto,thostnameas

'localhost:3306'.

$g_hostname='localhost';

$g_db_urname='mantis';

$g_db_password='mantis';

$g_databa_name='mantis';

#这里数据库用户名,密码,和数据库名称,全都是用mantis.

#要在myssql中新建一个数据库用户mantis,注意给它足够的权限。

#Supportedtypes:mysqlforMySQL,mysqliforMySQL,pgsqlfor

PostgreSQL,mssqlforMSSQLServer,oci8forOracle.这里支持的数据库类

型还真不少。

$g_db_type='mysql';

十二、web服务器(ApacheOrIIS)

mantis目前常用的服务就是这两种,这里推荐用Apache.

Apache现在版本是2.2系列。配置主要是一个应用服务目录的配置,

打开,在文件的最后添加以下内容:

Alias/mantis"D:/mantis-1.1.0a2/"

#这是服务访问的虚拟路径设置

OptionsIndexes

AllowOverrideNone

Orderallow,deny

Allowfromall

Apache端口修改:

#Listen12.34.56.78:80

Listen80

默认应用目录修改:

DocumentRoot"D:/mantis-1.1.0a2"

7.修改严重性等级

在config_defaults_文件中查找MantisEnumStrings

就能看到系统中定义的一些级别都可以在这里找到,在此仅介绍严重性等级。

$g_verity_enum_string这个字段就是严重性等级的字段,可以按照需要在后面的

值中进行删减,比如我只需要4类,就如下修改:

$g_verity_enum_string='10:feature,20:trivial,30:text,40:tweak';

或者把上面的这行直接添加到config_这个文件中即可。

因为Mantis的配置文件,是根据config_defaults_设置的,但凡是在

config_这个文件中进行声明的,都将依据config_为准。

十三、CustomizingColumnsinView

IssuesPage

Introduction

ThisrecipieexplainshowtocustomizethecolumnstobeviewedintheViewIssues

awhereacolumnisspecifiedinthelistofcolumnstobeviewed,but

thecodedeterminesthatsuchfieldisnotapplicableoristurnedoffviaconfiguration,

thecolumnwon‟tbeviewed.

ColumnNames

Followingisalistofcolumnstolectfrom:

lection-Thetickboxthatallowsthelectionofthebugstoperforma

groupoperationon.

edit-ThepenthatallowsopeninganissueinEditmode.

id-Theissueid.

project_id-Theprojectname

duplicate_id-Theidofthelastduplicatetforanissue.

reporter_id-Thereporteroftheissue.

handler_id-Thehandleroftheissue(sonassignedtheissue).

priority-Theissuepriority.

reproducibility-Theissuereproducibility.

projection-Theissueprojection.

eta-Theissuefixeta.

resolution-Theissueresolution.

target_version-Theissuetargetversion.

fixed_in_version-Theissuefixedinversion.

view_state-Theissueviewstate().

os-TheOStowhichtheissueapplies.

os_build-TheOSBuildtowhichtheissueapplies.

platform-Theplatformtowhichtheissueapplies.

version-Theproductversiontowhichtheissueapplies.

attachment-Thecolumnthatidentifieswhetheranissuehasattachments.

category-Theissuecategory.

verity-Theissueverity.

status-Theissuestatus.

last_updated-Theissuelastupdatedtimestamp.

summary-Theissuesummary.

bugnotes_count-Thenumberofnotesassociatedwiththeissue.

custom_xyz-Customfieldwithname“xyz”.

Fieldsviewedbydefault

Followingarethefieldsthatareviewedbydefault:

lection

edit

priority

id

sponsorship_total-thisfieldwon‟tbeshownif„enable_sponsorship‟

configurationoptionisttoOFF.

bugnotes_count

attachment-thisfieldwon‟tbeshownif„show_attachment_indicator‟

configurationoptionisttoOFF.

category

verity

status

last_updated

summary

UsingCustomFunctions

Inversionspriorto1.1.0a1,usingcustomfunctionswastheonlyoptionto

edetailsaboutthis

optionthisblogentry.

UsingConfiguration

InMantis1.1.0a1,supportwasimplementedtoallowcustomizingthecolumnstobe

additiontowebbadconfigurationsallowsa

veryeasywaytoconfigurethecolumnstobeviewedforallprojects,foraspecific

project,foraspecificur,orforaur/projectcombination.

Click“Manage”fromMainMenu.

Click“ManageConfiguration”from“Manage”sub-menu.

“ConfigurationReport”willbelectedbydefault.

Scrolltotheformatthebottomofthepage.

Selecttheurtowhichthechangeappliesor“AllUrs”.

Selecttheprojecttowhichthechangeappliesor“AllProjects”.

Type“view_issues_page_columns”inthe“configurationoption”field.

Leave“Type”fieldtto“Default”.

Setthe“Value”

“ColumnNames”ple:

array('lection','edit','priority','id','sponsorship_total','

bugnotes_count','attachment','category','verity','status','las

t_updated','summary');

Click“SetConfigurationOption”.

Changesin1.1.2

The“ManageConfiguration”pagehaschangedbehaviourin1.1.2becauof

thethecurityfixdetailedinbug8976;Thecorrectvaluetoufortheabove

examplestartingfrom1.1.2is:

array(lection,edit,priority,id,sponsorship_total,bugnotes_count,

attachment,category,verity,status,last_updated,summary)

十四、增加自定义字段

1、打开config_default_文件,找到$g_status_enum_string字段,增加一

个60:keepfollowed,的选项,如

2、在D:ProgramFilesxamppmantislang目录中打开

strings_chine_simplified_文件,找到

$s_status_enum_string字段,将对应的中文意思添加上去。

3、注意:如果还没有创建任何项目,那么该字段就会自动加入了工作流中了,但是

如果不是在刚新安装的

Mantis中配置的话,需要将该字段添加到工作流中才可以在修改Bug状态时看到该

状态字段。

4、添加工作流如下:

打开”管理配置管理工作流”,如图20所示,将”继续跟踪”所有选项勾选上

即可。

十五、系统对照:

C:mantislang

strings_chine_

$s_access_levels_enum_string='10:查看人员,25:报告人员,40:修改人

员,55:开发人员,70:经理,90:管理员';

$s_project_status_enum_string='10:开发中,30:已发布,50:稳定,70:停止

维护';

$s_project_view_state_enum_string='10:公共,50:私有';

$s_view_state_enum_string='10:公共,50:私有';

$s_priority_enum_string='10:无,20:低,30:中,40:高,50:加急,60:

特急';

$s_verity_enum_string='10:新特性,20:微不足道,30:文字错误,40:

不合理或别扭,50:次要错误,60:严重错误,70:系统崩溃,80:系统死锁';

$s_reproducibility_enum_string='10:经常,30:有时,50:随机,70:没有试

验,90:无法重复,100:不适用';

$s_status_enum_string='10:新建,20:打回,30:公认,40:已确认,50:

已分派,80:已解决,90:已关闭';

$s_resolution_enum_string='10:未处理,20:已修正,30:重新打开,40:

无法重现,50:无法修复,60:重复问题,70:不是问题,80:暂停,90:不做修改';

$s_projection_enum_string='10:无,30:很小的改动,50:较小的修正,70:

重要修正,90:重新设计';

$s_eta_enum_string='10:无,20:小于1天,30:2-3天,40:小于

1星期,50:小于1个月,60:超过1个月';

$s_sponsorship_enum_string='0:未支付,1:已请求,2:已支付';

strings_

#EnumStrings

$s_access_levels_enum_string=

'10:viewer,25:reporter,40:updater,55:developer,70:manager,90:administrato

r';

$s_project_status_enum_string=

'10:development,30:relea,50:stable,70:obsolete';

$s_project_view_state_enum_string='10:public,50:private';

$s_view_state_enum_string='10:public,50:private';

$s_priority_enum_string=

'10:none,20:low,30:normal,40:high,50:urgent,60:immediate';

$s_verity_enum_string=

'10:feature,20:trivial,30:text,40:tweak,50:minor,60:major,70:crash,80:blo

ck';

$s_reproducibility_enum_string='10:always,30:sometimes,50:random,70:have

nottried,90:unabletoreproduce,100:N/A';

$s_status_enum_string=

'10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,

90:clod';

$s_resolution_enum_string='10:open,20:fixed,30:reopened,40:unableto

reproduce,50:notfixable,60:duplicate,70:nochange

required,80:suspended,90:won'tfix';

$s_projection_enum_string='10:none,30:tweak,50:minorfix,70:major

rework,90:redesign';

$s_eta_enum_string='10:none,20:<1day,30:2-3days,40:<1week,50:<1

month,60:>1month';

$s_sponsorship_enum_string='0:Unpaid,1:Requested,2:Paid';

本文发布于:2023-01-02 13:53:24,感谢您对本站的认可!

本文链接:http://www.wtabcd.cn/fanwen/fan/90/78113.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

上一篇:grounds
标签:mantis
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图