Toolboxcategory cloud |
ViewsPersonal toolsLabeling Defect Number On Check InFrom Seapine Labs[edit] Using Defect Number to Label FilesA customer recently asked if there was a way to label a file when it is attached to a defect, and use the defect number as the label. While this cannot be accomplished out of the box, it can be accomplished through triggers. Using the environment variables, we can grab almost any information at run-time. These variables are listed in the Surround SCM User Guide. To accomplish this I created a trigger to be fired off on the attach to defect event. I set its action to be a batch file that contains the following line:
The previous script could also be created using a programming language. There are some examples on this wiki on how to use C# and there are some C++ examples on the Seapine Web site. The previous example could be taken a step further by creating a more meaningful label than just a defect number. You could concatenate the defect number with another string, like "Defect ". This way the label would be "Defect 23" instead of "23".
|


