CQ Connector: Mapping a CQ field to the RTC Resolution
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:
|
15 answers
I updated my workflow and sync rule as indicated:
workflow:
sync rule:
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} |
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> |
Still isn't working. Let me do a bit more testing to see if I can figure out any other specific recreation details.
|
I will do some testing on my end using your custom workflow.
|
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
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.