Thursday, June 14, 2007

Manage Activity Creation

One of our applications is moving from VSS to CC UCM. The management likes the idea of activity very much. They want to centralize activity creation and manage the project progress by monitoring the status of activities. The thing is, we don’t have enough money for ClearQuest, which would be the ideal tool for implementing the idea.

All relies on the ClearCase administers (i.e. me). My first task is to create a no_mkactivity trigger except for team leads that would be responsible for creating activities for the developers. However, the deliver and rebase operation implicitly creates activities. This kind of activity must be allowed.

#!/usr/bin/perl

# Only allow this mkact if it is a result of a deliver or rebase
# Determine this by checking the parent op kind
if ($ENV{"CLEARCASE_POP_KIND"} ne "deliver_start" && $ENV{"CLEARCASE_POP_KIND"} ne "rebase_start") {
print "Activity creation is only permitted for deliver and rebase.\n";
exit 1;
}

exit 0

We have to create a trigger type for each project, as the team lead would be changing from project to project. And we have to apply the trigger type to the integration stream and each development stream.

cleartool mktrtype -ucm -rep -pre mkactivity -execu "perl /ccstore/admin/no_mkact.pl" -execw "ccperl \\\\10.2.194.153\ccstore\admin\no_mkact.pl" -nc -nusers ccadmin no_mkact_V5.3

cleartool mktrigger -c "no mkactivity for you" no_mkact_V5.3 stream:qinl_V5.3_d@/vobs/Horizon_PVOB

cleartool mktrigger -c "no mkactivity for you" no_mkact_V5.3 stream:V5.3_i@/vobs/Horizon_PVOB


To automate the process, you may want to create a post-op trigger for mkstream as well. The trigger is used to attach the no_mkact trigger to the stream.


cleartool mktrtype -rep -ucm -postop mkstream -nc -execu "cleartool mktrigger -n
c no_mkact_V5.3 stream:\$CLEARCASE_STREAM" -execw "cleartool mktrigger -nc no_mk
act_V5.3 stream:%CLEARCASE_STREAM%" post_mkstream_V5.3

cleartool mktrigger -nc post_mkstream_V5.3 project:V5.3@/vobs/Horizon_PVOB

Besides that, we need a script for the team leads to create activities for their developers. Basically, it is a Perl script to take stream name, developer account id, and activity headline. The script will create the activity, and change the owner of the activity to the owner of the stream.

Cleartool mkact -in $stream -headline \"$act\" $act_id
Cleartool protect -chown $dev activity:$act_id

.