CQ Connector Custom CQ Schema
I am attempting to connect an RTC project to a custom CQ schema. The schema is based on the defect model but has had several modifications. One field I am attempting to map is a reference field in CQ. This field saves a reference to a DB2 record based on a choice made from a drop down list. I have tried simply placing the string value of the drop down list in the mapping, however, it does not "lookup" this string and convert it to its reference value. That is not surprising.
Is there anyway to map an RTC field to a reference field in CQ? I had the idea to simply lookup the reference value manually and then hard-code that value in the mapping but, even if that worked, it would not be an acceptable solution long term. Does the CQ connector support RTC -> CQ reference fields? Terry |
6 answers
The following link contains information on mapping a field of a reference to a Jazz custom attribute https://jazz.net/jazzdocs/topic/com.ibm.team.connector.cq.doc/topics/t_mapping_referenced_fields.html. Basically, the field of the reference is the "lookup" string that you are referring to that represents the reference. For example, if you have a defect record and it has a reference field to a platform record, which has a name field which uniquely identifies it, then the value in the custom attribute would contain the simple string of the platform.name field and not the platform reference value.
Lorelei Ngooi Jazz CQ Connector Team |
If I open a work item of type defect in RTC and want it to create a defect in CQ, how do I set a reference field in CQ if I don't know what the reference is? Can the CQ connector lookup the reference from the CQ database?
Use Case: Create work item type defect in RTC. When the sync happens, I want it to create a corresponding CQ defect filling in all required fields. These fields include drop-down lists populated by CQ DB records. If I were using the GUI in CQ to open a defect, I would simply choose 'xxx' from the drop-down list and the reference to the item I selected would be set to the reference field. How can I get the connector to lookup the list of choices and set the appropriate reference value into the field? Terry |
If I understand your question correctly, you're saying in CQ you have a reference field which is displayed as a drop-down list. On the RTC side, you would like to have a similar field and to be able to set its value via a drop-down list. If this is correct, then you need to define an enumeration attribute type in the process spec that contains the values that you want displayed in the drop-down list. Then you define a custom attribute of that enumeration type for this new field. Finally, you can map this custom attribute to a field of a reference according to the link I mentioned in a previous response.
You can use the priority enumeration as an example of how to setup an enumeration and define a custom attribute of that type. Lorelei |
I have created the custom attribute fields to hold the references from CQ in RTC, however, I am now receiving the following error but do not understand what is required to fix it.
Incoming at 10/22/08 4:28:15 PM CDT Error occurred: java.lang.RuntimeException: Please specify a work item type by creating a property mapping in the sync rule that determines its value. The sync rule defines the work item type as a Defect. Sync Rule Source <xml> <syncRule> <name>dSTGC Sync</name> <externalTypeName>com.ibm.rational.clearquest.Defect</externalTypeName> <syncItemTypeName>WorkItem</syncItemTypeName> <syncItemTypeNsURI>com.ibm.team.workitem</syncItemTypeNsURI> <syncItemTypeQualifier>Type:defect</syncItemTypeQualifier> <itemManager>com.ibm.team.interop.service.managers.workitem.WorkItemManager</itemManager> <externalManager>com.ibm.team.interop.service.managers.clearquest.CQExternalManager</externalManager> <maxCycleCount>0</maxCycleCount> <syncAllItemStates>false</syncAllItemStates> <propertyMappings> <propertyMapping> <externalPropertyName>Severity</externalPropertyName> <itemPropertyName>Severity</itemPropertyName> <incoming>true</incoming> <outgoing>true</outgoing> <itemIdentifier>false</itemIdentifier> <externalIdentifier>false</externalIdentifier> <externalModifier>false</externalModifier> <requiredItemProperties></requiredItemProperties> <requiredExternalProperties></requiredExternalProperties> </propertyMapping> <propertyMapping> <externalPropertyName>Component_Name</externalPropertyName> <itemPropertyName>attribute:smallString:component</itemPropertyName> <incoming>true</incoming> <outgoing>true</outgoing> <itemIdentifier>false</itemIdentifier> <externalIdentifier>false</externalIdentifier> <externalModifier>false</externalModifier> <requiredItemProperties></requiredItemProperties> <requiredExternalProperties></requiredExternalProperties> </propertyMapping> <propertyMapping> <externalPropertyName>Notes_Log</externalPropertyName> <itemPropertyName>Description</itemPropertyName> <incoming>true</incoming> <outgoing>true</outgoing> <itemIdentifier>false</itemIdentifier> <externalIdentifier>false</externalIdentifier> <externalModifier>false</externalModifier> <requiredItemProperties></requiredItemProperties> <requiredExternalProperties></requiredExternalProperties> </propertyMapping> <propertyMapping> <externalPropertyName>Subtier</externalPropertyName> <itemPropertyName>attribute:string:tier</itemPropertyName> <incoming>true</incoming> <outgoing>true</outgoing> <itemIdentifier>false</itemIdentifier> <externalIdentifier>false</externalIdentifier> <externalModifier>false</externalModifier> <requiredItemProperties></requiredItemProperties> <requiredExternalProperties></requiredExternalProperties> </propertyMapping> <propertyMapping> <externalPropertyName>Headline</externalPropertyName> <itemPropertyName>Summary</itemPropertyName> <incoming>true</incoming> <outgoing>true</outgoing> <itemIdentifier>false</itemIdentifier> <externalIdentifier>false</externalIdentifier> <externalModifier>false</externalModifier> <requiredItemProperties></requiredItemProperties> <requiredExternalProperties></requiredExternalProperties> </propertyMapping> <propertyMapping> <externalPropertyName>Phase_Found</externalPropertyName> <itemPropertyName>Version</itemPropertyName> <incoming>true</incoming> <outgoing>true</outgoing> <itemIdentifier>false</itemIdentifier> <externalIdentifier>false</externalIdentifier> <externalModifier>false</externalModifier> <requiredItemProperties></requiredItemProperties> <requiredExternalProperties></requiredExternalProperties> </propertyMapping> <propertyMapping> <externalPropertyName>version</externalPropertyName> <itemPropertyName>attribute:integer:version</itemPropertyName> <incoming>true</incoming> <outgoing>true</outgoing> <itemIdentifier>false</itemIdentifier> <externalIdentifier>false</externalIdentifier> <externalModifier>false</externalModifier> <requiredItemProperties></requiredItemProperties> <requiredExternalProperties></requiredExternalProperties> </propertyMapping> <propertyMapping> <externalPropertyName>Subsystem</externalPropertyName> <itemPropertyName>attribute:string:subsystem</itemPropertyName> <incoming>true</incoming> <outgoing>true</outgoing> <itemIdentifier>false</itemIdentifier> <externalIdentifier>false</externalIdentifier> <externalModifier>false</externalModifier> <requiredItemProperties></requiredItemProperties> <requiredExternalProperties></requiredExternalProperties> </propertyMapping> <propertyMapping> <externalPropertyName>OwnerInfo</externalPropertyName> <itemPropertyName>Creator</itemPropertyName> <incoming>true</incoming> <outgoing>true</outgoing> <itemIdentifier>false</itemIdentifier> <externalIdentifier>false</externalIdentifier> <externalModifier>false</externalModifier> <requiredItemProperties></requiredItemProperties> <requiredExternalProperties></requiredExternalProperties> </propertyMapping> <propertyMapping> <externalPropertyName>@@uniqueId@@</externalPropertyName> <itemPropertyName>attribute:string:uniqueid</itemPropertyName> <incoming>true</incoming> <outgoing>true</outgoing> <itemIdentifier>false</itemIdentifier> <externalIdentifier>false</externalIdentifier> <externalModifier>false</externalModifier> <requiredItemProperties></requiredItemProperties> <requiredExternalProperties></requiredExternalProperties> </propertyMapping> <propertyMapping> <externalPropertyName>Reported_Release_Name</externalPropertyName> <itemPropertyName>attribute:string:reportedreleasename</itemPropertyName> <incoming>true</incoming> <outgoing>true</outgoing> <itemIdentifier>false</itemIdentifier> <externalIdentifier>false</externalIdentifier> <externalModifier>false</externalModifier> <requiredItemProperties></requiredItemProperties> <requiredExternalProperties></requiredExternalProperties> </propertyMapping> </propertyMappings> </syncRule> |
This sync rule includes a work item type qualifier, <syncItemTypeQualifier>Type:defect</syncItemTypeQualifier>, which is used to determine whether or not to apply the sync rule to a specific type of work item or a category of work item types. In addition, you need to add a property mapping to set the work item type. For more information, see
https://jazz.net/jazzdocs/topic/com.ibm.team.connector.cq.doc/topics/t_mapping_multiple_types.html. Looking at this sync rule, you probably just need to add the following: <propertyMapping> <externalPropertyName></externalPropertyName> <itemPropertyName>Type</itemPropertyName> <incoming>true</incoming> <outgoing>false</outgoing> <itemIdentifier>false</itemIdentifier> <externalIdentifier>false</externalIdentifier> <externalModifier>false</externalModifier> <requiredItemProperties></requiredItemProperties> <requiredExternalProperties></requiredExternalProperties> <valueMappings> <valueMapping> <externalValue></externalValue> <itemValue>defect</itemValue> <defaultExternalValue>false</defaultExternalValue> <defaultItemValue>true</defaultItemValue> </valueMapping> </valueMappings> </propertyMapping> Lorelei |
You need to define a mapping for the "Type" property of a work item, so that it gets set to some value. You've set the item type qualifier of the sync rule to defect, which indicates that the sync rule should only be used for work items of type defect when syncing out to CQ, but you also need to say that you want to set the Type property to defect when creating a work item from CQ data (yes, it's a bit redundant).
The online help topic that explains this is at https://jazz.net/jazzdocs/topic/com.ibm.team.connector.cq.doc/topics/t_mapping_multiple_types.html Basically, you want to map the CQ field "record_type" to the work item property "Type", and since your sync rule applies to only one type, add a single value mapping that maps your CQ record type (e.g. "Defect", if that's what you named it) to work item type "defect" (the work item type name is in lower case in our sample process templates like Eclipse Way). John Jazz ClearQuest Connector Team |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.