It's all about the answers!

Ask a question

CQ Connector: Mapping a CQ field to the RTC Resolution


Chris Ratcliffe (2633330) | asked Jun 11 '09, 2:05 p.m.
I am seeing an odd behavior in CQ record to RTC syncronization through the CQ Connector.

I have created a custom workitem in RTC that has a very simple workflow with only 2 states, Opened and Closed. Each of my CQ states maps to one or the other. For example, in CQ I have a state called Canceled which maps to RTC Closed. In CQ, when the Canceled state is chosen, the user must choose a value in the Answer field. In my sync rule, I have a mapping of CQ State to RTC Status, and CQ Answer to RTC Resolution.

I have noticed that when a CQ record is updated such that:

1. The changes to the CQ State cause the RTC State to change from Opened to Closed, and
2. An attempt is made to map the Answer value to a Resolution value

The state changes ok, but the Resolution mapping doesn't work properly. For example, one of the Answer values is as_designed, and my sync rule maps that to the "Won't Fix" Resolution. But when I Cancel a defect, and set the Answer to as_designed, in RTC, after the sync, the work item is Closed, but he Answer says Fixed. I noticed that if I changed my mapping so that the Canceled CQ state doesn't map to Closed in RTC, which is to say that Canceling my CQ defect doesn't cause a state change in RTC, then the Answer to Resolution mapping works properly.

Is it possible that under the covers when the connector run the required action to move the RTC record from Opened to Closed, that the act of changing the state somehow triggers an automatic setting of Resolution that is overriding the mapping coming in from the CQ Answer field?

Here is my workflow definition:


<workflowDefinition id="IMCSWorkflow">
<workflow description="This workflow is used by item types that map to ClearQuest IMCS record types." name="IMCS Workflow" startActionId="IMCSWorkflow.action.a7">
<resolution icon="processattachment:/workflow/works.gif" id="IMCSWorkflow.resolution.r2" name="Works For Me"/>
<resolution icon="processattachment:/workflow/reject.gif" id="IMCSWorkflow.resolution.r1" name="Invalid"/>
<resolution description="The problem is resolved, but the specific fix is unknown." icon="processattachment:/workflow/resolve.gif" id="IMCSWorkflow.resolution.r11" name="Indirect Fix"/>
<resolution description="The fix has been applied but not verified yet." icon="processattachment:/workflow/inprogress.gif" id="IMCSWorkflow.resolution.r10" name="Unverified Fix"/>
<resolution icon="processattachment:/workflow/close.gif" id="IMCSWorkflow.resolution.r5" name="Fixed"/>
<resolution icon="processattachment:/workflow/duplicate.gif" id="IMCSWorkflow.resolution.r4" name="Duplicate"/>
<resolution icon="processattachment:/workflow/wontdo.gif" id="IMCSWorkflow.resolution.r3" name="Won't Fix"/>
<resolution description="The issue lies with third party code or a third party tool." icon="processattachment:/workflow/close2.gif" id="IMCSWorkflow.resolution.r9" name="Vendor Problem"/>
<resolution icon="processattachment:/workflow/defer.gif" id="IMCSWorkflow.resolution.r8" name="Later"/>
<resolution description="The fix applied was rejected." icon="processattachment:/workflow/reject2.gif" id="IMCSWorkflow.resolution.r12" name="Rejected Fix"/>
<resolution description="Used when mapping a blank CQ Answer field to the Resolution field." icon="processattachment:/workflow/unconfigure.gif" id="IMCSWorkflow.resolution.r13" name="To Be Determined"/>
<action icon="processattachment:/workflow/reopen.gif" id="IMCSWorkflow.action.a11" name="Reopen" state="IMCSWorkflow.state.s3"/>
<action icon="processattachment:/workflow/close.gif" id="IMCSWorkflow.action.a5" name="Close" state="IMCSWorkflow.state.s1">
<resolution id="IMCSWorkflow.resolution.r5"/>
<resolution id="IMCSWorkflow.resolution.r4"/>
<resolution id="IMCSWorkflow.resolution.r3"/>
<resolution id="IMCSWorkflow.resolution.r2"/>
<resolution id="IMCSWorkflow.resolution.r1"/>
<resolution id="IMCSWorkflow.resolution.r8"/>
<resolution id="IMCSWorkflow.resolution.r12"/>
<resolution id="IMCSWorkflow.resolution.r11"/>
<resolution id="IMCSWorkflow.resolution.r10"/>
<resolution id="IMCSWorkflow.resolution.r9"/>
</action>
<action icon="processattachment:/workflow/open.gif" id="IMCSWorkflow.action.a7" name="Submit" state="IMCSWorkflow.state.s3"/>
<state group="closed" icon="processattachment:/workflow/close.gif" id="IMCSWorkflow.state.s1" name="Closed" showResolution="true">
<action id="IMCSWorkflow.action.a11"/>
</state>
<state group="open" icon="processattachment:/workflow/open.gif" id="IMCSWorkflow.state.s3" name="Opened" showResolution="false">
<action id="IMCSWorkflow.action.a5"/>
</state>
</workflow>
</workflowDefinition>

15 answers



permanent link
Chris Ratcliffe (2633330) | answered Jun 15 '09, 3:52 p.m.
I updated my workflow and sync rule as indicated:

workflow:

<workflowDefinition id="IMCSWorkflow">
<workflow description="This workflow is used by item types that map to ClearQuest IMCS record types." name="IMCS Workflow" reopenActionId="IMCSWorkflow.action.a11" resolveActionId="IMCSWorkflow.action.a5" startActionId="IMCSWorkflow.action.a7">
<resolution icon="processattachment:/workflow/unresolve.gif" id="r0" name="Unresolved"/>
<resolution icon="processattachment:/workflow/works.gif" id="IMCSWorkflow.resolution.r2" name="Works For Me"/>
<resolution icon="processattachment:/workflow/reject.gif" id="IMCSWorkflow.resolution.r1" name="Invalid"/>
<resolution description="The problem is resolved, but the specific fix is unknown." icon="processattachment:/workflow/resolve.gif" id="IMCSWorkflow.resolution.r11" name="Indirect Fix"/>
<resolution icon="processattachment:/workflow/close.gif" id="IMCSWorkflow.resolution.r5" name="Fixed"/>
<resolution description="The fix has been applied but not verified yet." icon="processattachment:/workflow/inprogress.gif" id="IMCSWorkflow.resolution.r10" name="Unverified Fix"/>
<resolution icon="processattachment:/workflow/duplicate.gif" id="IMCSWorkflow.resolution.r4" name="Duplicate"/>
<resolution icon="processattachment:/workflow/wontdo.gif" id="IMCSWorkflow.resolution.r3" name="Won't Fix"/>
<resolution description="The issue lies with third party code or a third party tool." icon="processattachment:/workflow/close2.gif" id="IMCSWorkflow.resolution.r9" name="Vendor Problem"/>
<resolution description="Used when mapping a blank CQ Answer field to the Resolution field." icon="processattachment:/workflow/unconfigure.gif" id="IMCSWorkflow.resolution.r13" name="To Be Determined"/>
<resolution icon="processattachment:/workflow/defer.gif" id="IMCSWorkflow.resolution.r8" name="Later"/>
<resolution description="The fix applied was rejected." icon="processattachment:/workflow/reject2.gif" id="IMCSWorkflow.resolution.r12" name="Rejected Fix"/>
<action icon="processattachment:/workflow/reopen.gif" id="IMCSWorkflow.action.a11" name="Reopen" state="IMCSWorkflow.state.s3"/>
<action icon="processattachment:/workflow/close.gif" id="IMCSWorkflow.action.a5" name="Close" state="IMCSWorkflow.state.s1">
<resolution id="IMCSWorkflow.resolution.r5"/>
<resolution id="IMCSWorkflow.resolution.r4"/>
<resolution id="IMCSWorkflow.resolution.r3"/>
<resolution id="IMCSWorkflow.resolution.r2"/>
<resolution id="IMCSWorkflow.resolution.r1"/>
<resolution id="IMCSWorkflow.resolution.r8"/>
<resolution id="IMCSWorkflow.resolution.r12"/>
<resolution id="IMCSWorkflow.resolution.r11"/>
<resolution id="IMCSWorkflow.resolution.r10"/>
<resolution id="IMCSWorkflow.resolution.r9"/>
</action>
<action icon="processattachment:/workflow/open.gif" id="IMCSWorkflow.action.a7" name="Submit" state="IMCSWorkflow.state.s3"/>
<state group="closed" icon="processattachment:/workflow/close.gif" id="IMCSWorkflow.state.s1" name="Closed" showResolution="true">
<action id="IMCSWorkflow.action.a11"/>
</state>
<state group="open" icon="processattachment:/workflow/open.gif" id="IMCSWorkflow.state.s3" name="Opened" showResolution="false">
<action id="IMCSWorkflow.action.a5"/>
</state>
</workflow>
</workflowDefinition>


sync rule:


<propertyMapping>
<externalPropertyName>Answer</externalPropertyName>
<itemPropertyName>Resolution</itemPropertyName>
<incoming>true</incoming>
<outgoing>true</outgoing>
<itemIdentifier>false</itemIdentifier>
<externalIdentifier>false</externalIdentifier>
<externalModifier>false</externalModifier>
<requiredItemProperties></requiredItemProperties>
<requiredExternalProperties></requiredExternalProperties>
<valueMappings>
<valueMapping>
<externalValue>as_designed: The program works as designed.</externalValue>
<itemValue>Won't Fix</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>deviation: Code or documentation will deviate from standards.</externalValue>
<itemValue>Won't Fix</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>future: Future releases or versions will address this defect.</externalValue>
<itemValue>Later</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>hardware_error: The problem is caused by a hardware error.</externalValue>
<itemValue>Invalid</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>info_needed: More information is required.</externalValue>
<itemValue>Invalid</itemValue>
<defaultExternalValue>true</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>limitation: The problem is a current limitation.</externalValue>
<itemValue>Won't Fix</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>suggestion: This is a suggestion, not an error.</externalValue>
<itemValue>Won't Fix</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>unrecreatable: The problem cannot be recreated.</externalValue>
<itemValue>Works For Me</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>usage_error: The problem is caused by incorrect usage.</externalValue>
<itemValue>Invalid</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>valid_alpha_defect: Fix is being checked in directly to branch.</externalValue>
<itemValue>Invalid</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>npf: No plan to fix this defect.</externalValue>
<itemValue>Won't Fix</itemValue>
<defaultExternalValue>true</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>vendor_defect: Defect caused by vendor.</externalValue>
<itemValue>Vendor Problem</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>fixed: The problem is already fixed.</externalValue>
<itemValue>Indirect Fix</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>duplicate: This is a duplicate of an existing defect.</externalValue>
<itemValue>Duplicate</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>verified_fix: The fix has been applied and verified.</externalValue>
<itemValue>Fixed</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>rejected_fix: The fix has been applied and rejected as a bad fix.</externalValue>
<itemValue>Rejected Fix</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue>unverified_fix: The fix has been applied but not verified yet.</externalValue>
<itemValue>Unverified Fix</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
<valueMapping>
<externalValue></externalValue>
<itemValue>Unresolved</itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>
</valueMappings>
</propertyMapping>
</propertyMappings>


but still getting the same error. Here is the contents of the debug logfile for the 4 CQ based updates.

1. Create CQ record

: Attempting incoming sync; running as chrisr@ca.ibm.com
2009-06-15 12:26:38,320 DEBUG com.ibm.team.interop - ExternalProxy : Syncing in external state _cjinUFniEd6bRIsF8KObgg
2009-06-15 12:26:38,320 DEBUG com.ibm.team.interop - ExternalProxy : Base external state id: <unknown>
2009-06-15 12:26:39,789 DEBUG com.ibm.team.interop - ExternalProxy : Applying properties to Jazz item:
{attribute:smallString:cq_imcs_#=jul0900000056, State=Opened, Severity=Major, Category=_c9M7OFHkEd6FGffBDT-oIw, Summary=testing remarks synchronization, Priority=4 Medium, CreationDate=2009-06-15 15:24:13.0, Creator=_A2LrsWBpEd2zNtfZwHSp2g, Type=imcs_defect, attribute:IMCS_States:cq_imcs_state=Opened, Resolution=Unresolved, Description=test desc, Comments=user==_A2LrsWBpEd2zNtfZwHSp2g!FIELD!text========Original Description====== .

test desc!NOTE_ENTRY!, Owner=_A2LrsWBpEd2zNtfZwHSp2g}


2. Return CQ record with an Answer of as_designed

: Attempting incoming sync; running as chrisr@ca.ibm.com
2009-06-15 12:29:40,021 DEBUG com.ibm.team.interop - ExternalProxy : Syncing in external state _3pHtkFniEd6bRIsF8KObgg
2009-06-15 12:29:40,021 DEBUG com.ibm.team.interop - ExternalProxy : Base external state id: _pMg6D1niEd6bRIsF8KObgg
2009-06-15 12:29:40,115 DEBUG com.ibm.team.interop - ExternalProxy : Last synced item state id: _d_Uo1FniEd6bRIsF8KObgg
2009-06-15 12:29:40,131 DEBUG com.ibm.team.interop - ExternalProxy : Applying properties to Jazz item:
{State=Closed, attribute:IMCS_States:cq_imcs_state=Returned, Resolution=Won't Fix}

3. Reopen CQ record

2009-06-15 12:30:41,755 DEBUG com.ibm.team.interop - ExternalProxy : Attempting incoming sync; running as chrisr@ca.ibm.com
2009-06-15 12:30:41,770 DEBUG com.ibm.team.interop - ExternalProxy : Syncing in external state _A2Jd0FnjEd6bRIsF8KObgg
2009-06-15 12:30:41,770 DEBUG com.ibm.team.interop - ExternalProxy : Base external state id: _7VAJcFniEd6bRIsF8KObgg
2009-06-15 12:30:41,864 DEBUG com.ibm.team.interop - ExternalProxy : Last synced item state id: _3r8YAVniEd6bRIsF8KObgg
2009-06-15 12:30:41,880 DEBUG com.ibm.team.interop - ExternalProxy : Applying properties to Jazz item:
{State=Opened, attribute:IMCS_States:cq_imcs_state=Opened}

4. Return CQ record again with an Answer of as_designed

2009-06-15 12:31:46,395 DEBUG com.ibm.team.interop - ExternalProxy : Attempting incoming sync; running as chrisr@ca.ibm.com
2009-06-15 12:31:46,410 DEBUG com.ibm.team.interop - ExternalProxy : Syncing in external state _KeTq4VnjEd6bRIsF8KObgg
2009-06-15 12:31:46,410 DEBUG com.ibm.team.interop - ExternalProxy : Base external state id: _A2Jd0FnjEd6bRIsF8KObgg
2009-06-15 12:31:46,488 DEBUG com.ibm.team.interop - ExternalProxy : Last synced item state id: _A41lYVnjEd6bRIsF8KObgg
2009-06-15 12:31:46,504 DEBUG com.ibm.team.interop - ExternalProxy : Applying properties to Jazz item:
{State=Closed, attribute:IMCS_States:cq_imcs_state=Returned}

permanent link
Lorelei Ngooi (1.5k22) | answered Jun 15 '09, 5:35 p.m.
JAZZ DEVELOPER
1. Remove the Unresolved resolution from your workflow's list of resolutions. The resolution value will be null for states that do not have a resolution value (ie. Opened state).

2. Modify the sync rule by adding the value mapping that maps the empty or null resolution value to the CQ empty answer value.

<valueMapping>
<externalValue></externalValue>
<itemValue></itemValue>
<defaultExternalValue>false</defaultExternalValue>
<defaultItemValue>false</defaultItemValue>
</valueMapping>

permanent link
Chris Ratcliffe (2633330) | answered Jun 16 '09, 11:17 a.m.
Still isn't working. Let me do a bit more testing to see if I can figure out any other specific recreation details.

permanent link
Lorelei Ngooi (1.5k22) | answered Jun 16 '09, 1:40 p.m.
JAZZ DEVELOPER
I will do some testing on my end using your custom workflow.

permanent link
Lorelei Ngooi (1.5k22) | answered Jun 16 '09, 2:30 p.m.
JAZZ DEVELOPER
I added your custom workflow to my process specification. Bound it to the defect work item type. Modified the state value mappings in the sync rule to the two Jazz work item states - Opened and Closed. Modified the resolution value mappings in the sync rule to the custom workflow resolutions. Kept the empty resolution value mapping. Still worked for me.

The only difference is my CQ schema.

Your answer


Register or to post 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.