Overview of DefineCQSchema

In the configuration file, edit the DefineCQSchema() definition to provide the required and optional field names. Map your database field names to conventions that are used in SAMPL database. This mapping allows query definitions to be more generic, but also tells the integration what field names to use for its own operations, for example, internal queries that it has to do. Certain field names are required, for example, ID, OWNER, STATE, and HEADLINE.

Tip: The ID field must be first in the results set. The field is used to select records for later operations.

Add other field names for your convenience, but these other mappable names are not required by the integration. Field names can be used directly in queries that you define if at least the required fields are made known to the integration.

The integration uses a CQSchema object to relate the field names that are defined to the field names that you use in your local record types. A CQSchema is loosely related to a Rational® ClearQuest® schema, but it really just describes record type fields and queries that are needed by the integration. It accomplishes the following tasks:

  • Defines a new CQSchema and provides a set of similar record types (entities) and properties (DefineCQSchema)
  • Relates the field names of the defect record type to those used by the record types that you specify (ChangeFieldMap)
  • Defines one or more queries (SetQuery) that are used by the trigger to provide the QUERY option that the developers see and specifies the final RESTRICTIONS check that is made before associations are made
  • Defines the query output format (SetResultSet)