Using the StarTeam 12 command line to populate newly created custom fields

0 Likes
over 9 years ago

Custom Fields - A powerful feature

StarTeam Enterprise Advantage includes the ability to create custom fields - user specified fields for data relevant to your workflow or processes. For example you may wish to include the field "Department" to identify the team responsible for a given change request or enhancement.

These fields can be used to drive workflow decisions - such as the status of a given change request, or even trigger a build. However these fields can be added at any time - which raises issues with the assignment of field values to pre-existing data, such as older change requests.

Enter the StarTeam Command Line Interface

The StarTeam 12.0 and later command line interface features a stateful SQL-Like syntax, with which "WHERE" clauses can be used to apply operations to particular objects.

The following example demonstrates command executed against a StarTeam 12 server to assign a value of "QA"  to the newly created custom field "Department" which is unset in a batch of pre-existing Change Requests.

Note the absence of values for the "Department" field in the original change requests:

The following command is run to set the field "Department" to "QA" in all instances where it is unset:

stcmd update changerequest set usr_department = "QA" where "query = usr_department = "" "

The field "Department" is then populated with "QA" for all existing Change Requests where the field was previously empty:

Further Information

The StarTeam command line interface can be a powerful tool for Administrators, particularly for batch edits to large data sets.

For further information regarding command line options and syntax, see the StarTeam 12 Command line Guide

Labels:

How To-Best Practice
Comment List
Anonymous
Related Discussions
Recommended