Detach labels from artifact instances

0 Likes
over 4 years ago

Use the detach-label command to remove labels from the specified IDs.

Syntax
The syntax for this command is:
detach-label [-p "projectSpecifier" [-pwdfile "filePath"] [-cmp]
[-csf] [-encrypt encryptionType]] -lbl "labelName" [-all | -type typeName |
-ifp "inputFilePath" ] [-q | -pf "filter name"] [ -ofp "output file path"]

Parameter Description
-ifp Specifies a fully qualified path to a file which contains a list of item IDs. The items associated
with item IDs are associated to the label. If -ifp is specified, -filter "fileStatus"
cannot be specified.


-lbl Specifies the label name on which to perform the action. This option can be used more than
once. The application action is for all of the labels on the specified file or revisions.


-all Specifies that the label will be detached from all items it is attached to.


-type Specifies that the label will be detached from all items of the specific type that it is attached
to.
Important: -all, -type, -ifp are mutually exclusive. You must specify just one of them. An
exception will be thrown if there are none or more than one specified.

Example
The item IDs are expected to be attached to the label. The detach-labels command removes them from
the label.
For example, the file could be the output of a select command, such as:
stcmd select viewmemberid from file 'c:/temp/fileids.txt' where attachedlabel
= 'x'
stcmd detach-label -p... -ifp "c:/temp/fields.txt" lbl 'x'

Labels:

How To-Best Practice
Comment List
Anonymous
Related Discussions
Recommended