发新话题
打印

[ClearQuest] 请所有参加2期的朋友翻译以下测试样张( 此文章被查看:1427次,被回复:2篇!! )

请所有参加2期的朋友翻译以下测试样张

以下为IBM Libray中的一篇文章,请大家翻译完就后发到我的邮箱(showgoods@yahoo.com),这个译文将作为对大家初步考核的依据,也是为后面的任务分配做准备。

注:参加过一期项目的朋友就不需要翻译以下文章了

原文地址:
http://www.ibm.com/developerworks/rational/library/4702.html?S_TACT=105AGX15&S_CMP=EDU

Accessing the ClearCase Automation Library from ClearQuest hooks

Jennifer Haines (jen.haines@gmail.com), IBM ClearQuest Administrator , Consultant
10 Apr 2007
Enhancing the IBM Rational ClearQuest schema by using stateless record types to create choicelists can help eliminate errors from manual entry in multiline text fields.
This program is for example purposes, and is provided as is. It has not been formally tested, and is not supported by IBM.

The problem
On my current project, standard IBM® Rational ClearCase® functions such as creating or locking a ClearCase project or stream, are tracked in IBM® Rational ClearQuest®. In order to request a new project the user needs to specify the PVOB Name, the source project name, the source stream name, the baseline that the project will be seeded with, and the new project name. For other requests, such as locking a stream, there was a need to include information that was already contained in ClearQuest, for example, user names and IDs. Unfortunately, for both these types of requests this information had to be typed into the description field which is a free-form multi-line text field. This left the request prone to typographical errors and delayed completing the request.

The solution
The solution to this requires enhancing the ClearQuest schema with some new functionality. The first step is to add stateless record types to track the types of requests, ClearCase PVOB names, ClearCase Projects names, and types of ClearCase streams. The second step involves adding fields on the state-based record type (aka Incident) that reference these stateless record types and some multi-line string fields. Additionally, there was a new tab added to the Incident record type.
In this example, the fields that were added to the stateless record types were fairly basic and they are the business unit name, state (e.g. Active/Inactive), and the appropriate name (e.g. Project Name, PVOB Name, etc). Since these records can only be Active or Inactive there was not really a big need to create them as state-based record types, even though there is a state field.
Each of the fields added to the Incident record type had a custom choicelist. The fields that reference stateless record types query for active records associated with a specific business that is specified in the Incident. For example, this script was implemented as a global script to query against the stateless PVOB record:

Script to query PVOB record
               
sub CL_CC_PVOB_Name
{
my @ccpvobs;
my $business = $entity->GetFieldStringValue("Bus_Unit_Name");
my $session = $entity->GetSession();
my $queryDef = $session->BuildQuery("CC_PVOB");
$queryDef->BuildField("CC_PVOB_Name");
my $filter = $queryDef->BuildFilterOperator($CQPerlExt::CQ_BOOL_OP_AND);
        $filter->BuildFilter("Bus_Unit_Name",$CQPerlExt::CQ_COMP_OP_EQ, [$business]);
my $resultSet = $session->BuildResultSet($queryDef);
        $resultSet->Execute();
               
while ($resultSet->MoveNext == $CQPerlExt::CQ_SUCCESS)
{
        my $ccpvobname = $resultSet->GetColumnValue(1);
        push (@ccpvobs, $ccpvobname);
}

return @ccpvobs;
}     
      

The fields that are used to gather information stored in ClearCase have custom choicelists as well, by using the ClearCase Automation Library (CAL). The following script gets the value of the ClearCase Target Project Name field and the ClearCase PVOB Name field and then uses the CAL to get information from ClearCase.

Script to extract ClearCase information
                 

my $projectlist = $entity->GetFieldValue("CC_Target_Project_Nm")->GetValueAsList();
        my $pvob = $entity->GetFieldStringValue("CC_PVOB_Name");
        use Win32::OLE;
        my $ct = Win32::OLE->new('ClearCase.ClearTool')
                or die "Could not create the ClearTool object\n";
                foreach $project (@$projectlist){
                        my @lsstream = $ct->CmdExec("lsstream -short -in project:$project\@\\$pvob");
                                        foreach $stream (@lsstream) {
                                                push (@choices,$stream);
                                        }
                }
      

By creating this functionality in ClearQuest, we can gather specific data for a particular task relating to the ClearCase Project or Stream, and these requests can then be completed more accurately and more efficiently.

[ 本帖最后由 yunshan 于 2007-9-10 00:07 编辑 ]



© 本文为 yunshanSCMLife 共同所有,未经同意,请勿转载 ©如该文侵犯了您的版权,请联系管理员

TOP

回复 #1 yunshan 的帖子

yunshan,你给的这个yahoo的邮箱不好用,我把测试样张的翻译,发了好多次都说有延时发不出去,这次不知道发出去没有。



© 本文为 chrissunSCMLife 共同所有,未经同意,请勿转载 ©如该文侵犯了您的版权,请联系管理员

TOP

回复 #2 chrissun 的帖子

我的yahoo邮箱是好的,其他人发的我都能收到,你试试我的MSN邮箱吧:shan3981@hotmail.com



© 本文为 yunshanSCMLife 共同所有,未经同意,请勿转载 ©如该文侵犯了您的版权,请联系管理员

TOP

发新话题