This section looks at the issues around mastership in ClearQuest.
The out-of-box behavior is for the originating site to master the records it creates. If your change management process is at the stage where you are just recording changes, or where the approval process is done locally, the defaults work fine.
Just as with ClearCase, you can give mastership away of a record mastered by your site. From the command line, as an ClearQuest administrator:
multiutil chmaster -fam PLAY -user admin "" tokyo Defect:PLAY00000001
To allow users to give away mastership, modify the schema to expose the mastership field ratl_mastership as shown in Figure 14-6:
The exposed ratl_mastership field is better than asking the administrator to make the change for you, but it is not a good solution for any systemic requirement for change of mastership. Read on.
If the site uses a ClearQuest Web site and you have access to it, you can just access the record directly over the Web. From the ClearQuest database perspective, you are logging in locally. This is a fairly common practice and is very useful for those cases where you just want to add some additional information to the record.
What if testers are not co-located with developers? What if the project decides that all activities will be triaged in Boston before being assigned? Now you definitely need an automated way to pass mastership around. Here is an example implementation described by Ryan Sappenfield in Rational ClearQuest MultiSite Tips & Tricks and available from developerWorks.
Mastership rule (pseudo-code):
If (State=Submitted,Postponed,Resolved,Duplicate, or Closed) Mastership=Boston If (State=Assigned, or Closed) Mastership=Replica of Owner
Implement this through a Base Validation Action hook, called set_mastership, as shown in Figure 14-7 with Perl code shown in Figure 14-8.
sub Defect_Validation { my($actionname, $actiontype) = @_; my $result; $sessionObj = $entity->GetSession(); $state = $entity->GetFieldValue("State")->GetValue(); $owner = $entity->GetFieldValue("Owner")->GetValue(); $site = $entity->GetFieldValue("ratl_mastership")->GetValue(); # check state value if ($state eq "Submitted" | "Postponed" | "Resolved" | "Duplicate" | "Closed") { #set mastership to Boston $entity->SetFieldValue("ratl_mastership", "BOSTON"); }elsif ($state eq "Assigned" | "Opened") { #get mastership of the current record owner my $userObj = $sessionObj->GetEntity("users",$owner); my $userMastership = $userObj->GetFieldValue("ratl_mastership")->GetValue(); #set mastership of record to match current owner $entity->SetFieldValue("ratl_mastership",$userMastership); } return $result; |
Follow the procedures described in ““Manual change of mastership” on page 288” to update the schema.
18.190.207.144