How do I extract a list of all the labels used in a StarTeam project?

0 Likes

Problem:

How do I extract a list of all the labels used in a StarTeam project?

Resolution:


  • Product Name: StarTeam
  • Product Version: All
  • Product Component: CPC
  • Platform/OS Version: N/A


This is possible, however, you cannot extract the full list of view and revision labels using the StarTeam client. The reason for this is that you are not able to access the labels via the filters or queries etc..

The only way this information can be made available is via the following methods:

  1. Database SQL query.
  2. StarTeam SDK API.

To Extract From The Database:
We have a view called syn_ConfigLabel and this holds all the labels (revision and view labels) and can be queried to return the label name, who added and the project ID it belongs to etc.. We can can query the syn_ConfigLabel and the the syn_Project to build up the list of project labels.

The following SQL will return all the revision labels stored for all StarTeam projects:

SELECT *
FROM syn_ConfigLabel
WHERE (Flags = 1)
ORDER BY ProjectID


The revision labels are saved with a Flags value of 1 in this table. If you want to show all view labels and revision labels simply remove the where clause and run as shown below:

SELECT *
FROM syn_ConfigLabel
ORDER BY ProjectID

To find out the name of the project you will then need to run the following code:

SELECT ID, Name, Description
FROM syn_Project

This will display the full list of projects. You can then refine this to only return the project labels that you are interested in (as a result of the label query):

SELECT ID, Name, Description
FROM syn_Project W
WHERE (ID = 0)

This will output the name of the project that the labels belong to.

To Extract From The SDK:
To do this via an SDK runtime would take a considerable effort and would be a custom solution delivered via the professional services team. If you are interested in such a solution please contact technical support.


Old KB# 29256
Comment List
Related
Recommended