Seapine Labs
Personal tools

Labeling Defect Number On Check In

From Seapine Labs

Jump to: navigation, search

[edit] Using Defect Number to Label Files

A 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:


sscm label %SSCM_FILE% -b%SSCM_BRANCH% -c- -l%SSCM_DEFECTNUMBER% -p%SSCM_Repository% -yAdministrator:password -z127.0.0.1:4900

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".

Note: Seapine does not provide support for sample triggers and scripts.














Issue Management Software | Source Code Control Software | Test Case Management