INHIBIT_DUPLICATE_ELE.pl Before allowing a new element to be created make sure that the element does not already exist in for this directory in some branch that is invisible to thie current view. If the element already exist warn the user and disallow the action. If the user is the VOB_OWNER then give the option to abort the mkelem or perform the action anyway. | ||
Author | : | A Better Solution, Inc. |
: | support@abs-consulting.com | |
URL | : | https://abs-consulting.com |
Date | : | April 08, 1998 |
This trigger script is expected to be called from a preop trigger. Notice it is not called from pre-mkelem, pre-mkslink or pre-mv (there "actually" is no pre-mv). This is because they each actually call a cleartool lnname first, so the trigger is appied there.
The administrator should create an trigger like so (or similar):
cleartool mktrtype -ele -all -pre lnname -c "Only allow the VOB-owner the ability to create elements that already exist as duplicates in the current directory but in a branch hidded from the current view" -exec "{path}/perl {path}/INHIBIT_DUPLICATE_ELE.pl" INHIBIT_DUPLICATE_ELE
If using ClearTrigger, you don't need to write ANY trigger code... Just turn on functionality bit (2) from the list of 25 Functionality Bits in the configuration file.
Read more on Policy without Triggers using ClearTrigger.