A Better Solution, Inc. - IBM Rational ClearCase Triggers

"Clearcase, Rational, clearCase consulting, ClearCase triggers, Jazz tools consultant, ABS, training, GSA, Rational, IBM, GSA, BM Rational Tools consultant, Clearquest, ClearCase training, CM, scm, ClearCase help, consulting, trainer, training, ClearCase guru, configuration management" "ClearCase triggers, RTC, Rational Team Concert, clearcase, CLEARCASE resume, trainer, consultant, clearcase, BM Rational Tools consultant, ClearCase training, GSA contract holder, Rational, IBM, CM, scm, ClearQuest Consulting, ClearCase help, consulting, trainer, training, ClearCase guru, configuration management" "triggers, ClearCase training, RTC, Requisite Pro, JAZZ, ABS, GSA Schedule holder, Rational, IBM, ClearCase training, CM, scm, ClearCase help, consulting, ClearQuest, BM Rational Tools consultant, trainer, training, ClearCase guru, configuration management"
CHECK_MAGIC_PATH.pl   Print this page...
..

CHECK_MAGIC_PATH.pl

Make sure the MAGIC_PATH env. variable is set to the company standard. If not then do not allow new element to be created.


Author:A Better Solution, Inc.
Email :support@abs-consulting.com
URL :https://abs-consulting.com
Date :January 13, 2003

This trigger script is expected to be called from a preop trigger.

Notice it is not called from pre-mkelem. This is because the cleartool mkelem command actually calls a cleartool lnname first, so the trigger is appied there and tested to make sure it is being called for a mkelem and not an actual lnname call or for some other command.

The administrator should create an trigger like so (or similar):

cleartool mktrtype -ele -all -pre lnname 
  -c "Only allow element creation when user's MAGIC_PATH env. variable is set to company standard." 
  -exec "{path}/ccperl.exe {path}/CHECK_MAGIC_PATH.pl" CHECK_MAGIC_PATH

Shortcut using...If using ClearTrigger...

If using ClearTrigger, you don't need to write ANY trigger code... Just turn on functionality bit (7) from the list of 25 Functionality Bits in the configuration file.

Read more on Policy without Triggers using ClearTrigger.