It's all about the answers!

Ask a question

cq connector - using custom schema


Gary Dang (59338955) | asked Jan 10 '08, 12:32 a.m.
I followed the steps to import the InterOp package into my custom schema but running into these initial questions. WIll have more to come:

1) For the 3 record types the InterOp package loads (Change_History, SyncedRecords,JazzConnectorProperties), are there forms associated with them as I can not create records off of them from the CQ client.

2) Since I am using a custom schema, what do I map Jazz workitem to as there isn't a project record type in my custom schema. When I am using the OTTB defecttrackingschema from Jazz, I can create project record but this doesn't exist in my custom schema. What do I need to do?

12 answers



permanent link
John Vasta (2.6k15) | answered Jan 10 '08, 12:03 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

1) For the 3 record types the InterOp package loads (Change_History, SyncedRecords,JazzConnectorProperties), are there forms associated with them as I can not create records off of them from the CQ client.


No, those record types are used internally by the CQ Connector, for storing metadata needed for the connector operation. You don't ever want to create or delete instances of those record types.


2) Since I am using a custom schema, what do I map Jazz workitem to as there isn't a project record type in my custom schema. When I am using the OTTB defecttrackingschema from Jazz, I can create project record but this doesn't exist in my custom schema. What do I need to do?


You have a couple choices:

1. Define a (stateless) record type similar to "Project" in your schema, and define a synchronization rule for it that connects it to work item categories (i.e. follow the pattern in the DefectTrackingInterop schema and rules we supply).

2. Select, or define, a field in an existing record type whose value can be mapped to a work item category (by name). See the topic "Using Rational Team Concert > Configuring and using Team Concert ClearQuest Connector > Configuring Team Concert > Editing synchronization rules to specify categories" in the online help, and the wiki page

https://jazz.net/wiki/bin/view/Main/ConnectorItemCategoryMapping

for some more background information. Note that, in the beta2 release, only incoming synchronization using this mechanism is supported. That is, a CQ record with a field whose value corresponds to the name of a work item category will result in the creation of a work item assigned to that category, but when a new work item results in the creation of a CQ record, the work item's category will not set the value of the corresponding record field. That should start working in upcoming M5 builds.

John

permanent link
Gary Dang (59338955) | answered Jan 14 '08, 7:47 p.m.
Q1. I tried to create synchronization rule to map to a custom record type. Basically, I am trying to map a few fields (headline and owner) in our custom DEFECT record type to Jazz. I first configured the cqconnector.properties to point to the right connection and started the cq gateway. I then verified that the gateway is running. However, when I am in the Sync Rule Editor, the External Type dropdown is blank which I think means it is not able to display the CQ record type for some reasons. What do I need to check?

Q2. If I have multiple CQ schema/user dbs on the same server, how do I configure the cqconnector.properties file to point to two different CQ schema/user dbs (e.g. I would have 2 different dbset names)?

permanent link
John Vasta (2.6k15) | answered Jan 15 '08, 9:21 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Q1. I tried to create synchronization rule to map to a custom record type. Basically, I am trying to map a few fields (headline and owner) in our custom DEFECT record type to Jazz. I first configured the cqconnector.properties to point to the right connection and started the cq gateway. I then verified that the gateway is running. However, when I am in the Sync Rule Editor, the External Type dropdown is blank which I think means it is not able to display the CQ record type for some reasons. What do I need to check?


Perhaps you haven't specified CQ connection information in the process specification for your project area, as described in the "Specifying connector manager preferences" topic of the online help. You should have added an XML element under the <data> element of the <project-configuration> element that looks something like this:

<configuration-data id="com.ibm.team.interop.configuration.syncPreferences"
xmlns="http://com.ibm.team.interop/syncPreferences">
<outgoingSync>
<enableCreation syncRuleName="com.ibm.rational.clearquest.sample_schema_repo.Defect"/>
</outgoingSync>
</configuration-data>
<managerPreferences id="com.ibm.team.interop.service.managers.kernel.ContributorManager"
incomingCaseInsensitive="true">
</managerPreferences>
<managerPreferences id="com.ibm.team.interop.service.managers.clearquest.CQExternalManager,com.ibm.team.interop.service.managers.clearquest.CQExternalManagerForUser">
<cqGateway uri="http://cqgateway:8081/InteropGateway/InteropServlet">
<connection_info>
<cq_connection dbSet="sample_schema_repo" db="SAMPL"/>
</connection_info>
</cqGateway>
</managerPreferences>

where you would change the names of synchronization rules, the CQ gateway URI, and the CQ dbset name to match your configuration.

Q2. If I have multiple CQ schema/user dbs on the same server, how do I configure the cqconnector.properties file to point to two different CQ schema/user dbs (e.g. I would have 2 different dbset names)?


A CQ gateway is dedicated to one CQ database. You would have to run multiple gateways to serve multiple databases.

John

permanent link
Gary Dang (59338955) | answered Jan 19 '08, 6:01 p.m.
John,

Regarding the issue with the Sync RUle Editor not displaying CQ fields, in the instruction, it says this but your response suggests to put the managerpreferences outside the configuration data tag. WHen I put it inside the configuration data tag (as child just like outgoing sync child), I get "Got an (random) Exception: null
Got an (random) Exception: null" in the gateway log output.
When I put managerpreferences outside per your response, I get "unexpected managerpreferences" error in the rule editor.

"In the Project Area editor click the Process Specification tab. Copy the managerPreferences element below and paste it into editor as a child to the configuration-data element that you create when specifying outgoing synchronization options"


This is what I have in the process spec that shows the tag before it plus the outgoing sync rule, managerpreferences tag but I get unexpected managerpreferences tag error.

<configuration-data id="com.ibm.team.workitem.configuration.enumerations" xmlns="http://com.ibm.team.workitem/enumerations">
<enumeration attributeTypeId="priority">
<literal id="1"
default="true"
name="Unassigned"
icon="platform:/plugin/com.ibm.team.workitem.common/icons/obj16/priority_unassign.gif"/>

<literal
id="2"
name="Low"
icon="platform:/plugin/com.ibm.team.workitem.common/icons/obj16/priority_low.gif"/>
<literal
id="3"
name="Medium"
icon="platform:/plugin/com.ibm.team.workitem.common/icons/obj16/priority_medium.gif"/>
<literal
id="4"
name="High"
icon="platform:/plugin/com.ibm.team.workitem.common/icons/obj16/priority_high.gif"/>
</enumeration>
<enumeration attributeTypeId="severity">
<literal
id="1"
name="Unclassified"
icon="platform:/plugin/com.ibm.team.workitem.common/icons/obj16/sev_unassign.gif"/>
<literal
id="2"
name="Minor"
icon="platform:/plugin/com.ibm.team.workitem.common/icons/obj16/sev_minor.gif"/>
<literal
id="3"
default="true"
name="Normal"
icon="platform:/plugin/com.ibm.team.workitem.common/icons/obj16/sev_normal.gif"/>
<literal
id="4"
name="Major"
icon="platform:/plugin/com.ibm.team.workitem.common/icons/obj16/sev_major.gif"/>
<literal
id="5"
name="Critical"
icon="platform:/plugin/com.ibm.team.workitem.common/icons/obj16/sev_critical.gif"/>
<literal
id="6"
name="Blocker"
icon="platform:/plugin/com.ibm.team.workitem.common/icons/obj16/sev_blocker.gif"/>
</enumeration>
<enumeration attributeTypeId="version">
<literal default="true" id="unassigned" name="Unassigned"/>
<!-- Define the additional versions to file work items against. -->

</enumeration>
</configuration-data>
<configuration-data id="com.ibm.team.interop.configuration.syncPreferences" xmlns="http://com.ibm.team.interop/syncPreferences">
<outgoingSync>
<enableCreation syncRuleName="com.ibm.rational.clearquest.IDC70.ADT_Defect"/>
<enableCreation syncRuleName="com.ibm.rational.clearquest.IDC70.ADT_Project_Properties"/>
</outgoingSync>
</configuration-data>
<managerPreferences id="com.ibm.team.interop.service.managers.kernel.ContributorManager" incomingCaseInsensitive="true">
</managerPreferences>
<managerPreferences id="com.ibm.team.interop.service.managers.clearquest.CQExternalManager,com.ibm.team.interop.service.managers.clearquest.CQExternalManagerForUser">
<cqGateway uri="http://localhost:8081/InteropGateway/InteropServlet">
<connection_info>
<cq_connection dbSet="IDC70" db="LogDB"/>
<login_info user_id="admin" password="test"/>
</connection_info>
</cqGateway>
</managerPreferences>
</data>

permanent link
Gary Dang (59338955) | answered Jan 19 '08, 6:19 p.m.
John, I went ahead and put the managerpreferences as child to configuration data similar to syncrule. THis fixed the unexpected tag error. However, as this still didn't work, I modified the following lines to reflect the native Defect and Project (note: I had ADT_Defect and ADT_Project_Properties before).

<enableCreation syncRuleName="com.ibm.rational.clearquest.IDC70.Defect"/>
<enableCreation syncRuleName="com.ibm.rational.clearquest.IDC70.Project"/>

This change seems to fix blank drop down issue as the editor now displays CQ record types in the external type drop down. However, I now have the following questions:

1) why did the change above fixed the blank drop down in the rule editor as I thought I was supposed to tell connector to create corresponding ADT_Defect and ADT_Project_Properties in CQ when the corresponding workitem and category records are created on the Jazz side respectively? Do I need to leave it as is?

2) I noticed that only some custom record types from the custom schema and not sure why?

permanent link
Gary Dang (59338955) | answered Jan 20 '08, 5:31 p.m.
I thiknk the synchronization of custom defect is working now. However, I have more questions in addition to the 2 I posted in previous posts.

3) I am still not sure which specific configuration step tells the CQ connector to sync inbound changes to Jazz. Is it the custom sync rules that I created? If so, I am not sure why after I added new sync rule for a different custom record type, cq connector does not pick up the creation of record on CQ side.

4) I am not seeing outbound synchronization activity. I checked the following tags in the process spec. THis question is related to question #1 as I am not sure what to specify here. I think this configures the outbound sync (e.g. create workitem in Jazz triggers create in CQ, etc). Again, I am confused what to put here because if I specify custom record types, I get the NULL error in the gateway startup window.
<outgoingSync>
<enableCreation syncRuleName="com.ibm.rational.clearquest.IDC70.Defect"/>
<enableCreation syncRuleName="com.ibm.rational.clearquest.IDC70.Projects"/>
</outgoingSync>

permanent link
John Vasta (2.6k15) | answered Jan 21 '08, 2:40 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Sorry, I made a mistake in my post on Jan 15; the <managerPreferences> elements should be nested inside the <configuration-data> element. (I meant to paste that text just before the closing </configuration-data> tag, but was off by one line. I hope that didn't cause you to waste too much time.)

Regarding your following questions:

1) why did the change above fixed the blank drop down in the rule editor as I thought I was supposed to tell connector to create corresponding ADT_Defect and ADT_Project_Properties in CQ when the corresponding workitem and category records are created on the Jazz side respectively? Do I need to leave it as is?


You're right; adding the <enableCreation> elements would have nothing to do with getting record type info back from the CQ gateway for the sync rule editor. I can only guess that you either also changed something else, or perhaps just restarted the servers.

2) I noticed that only some custom record types from the custom schema and not sure why?


Only record types that have been enabled for connection to Jazz, by applying the JazzInterop package to them, will be reported.

3) I am still not sure which specific configuration step tells the CQ connector to sync inbound changes to Jazz. Is it the custom sync rules that I created? If so, I am not sure why after I added new sync rule for a different custom record type, cq connector does not pick up the creation of record on CQ side.


For a CQ record to be sent to Jazz, it must 1) be of a record type that has been enabled for connection by applying the JazzInterop package to it, 2) have a sync rule for that record type (as given by the external type name attribute of the sync rule), and 3) have a filter specified for it in the cqconnector.properties file. A minimal filter is of the form "cq.query.MyRecordType=" - that is, an empty filter specification which means "select all records of type MyRecordType" (replacing MyRecordType with the actual name of your record type). If you don't want to select all records, you can add a query name to the filter, such as "cq.query.MyRecordType=Public Queries/Records To Sync".

4) I am not seeing outbound synchronization activity. I checked the following tags in the process spec. THis question is related to question #1 as I am not sure what to specify here. I think this configures the outbound sync (e.g. create workitem in Jazz triggers create in CQ, etc). Again, I am confused what to put here because if I specify custom record types, I get the NULL error in the gateway startup window.
<outgoingSync>
<enableCreation syncRuleName="com.ibm.rational.clearquest.IDC70.Defect"/>
<enableCreation syncRuleName="com.ibm.rational.clearquest.IDC70.Projects"/>
</outgoingSync>


You need to turn on polling for outgoing synchronization in general, as described in the help topic "Enabling outgoing synchronization". (You use the admin Web UI to modify the outgoingSyncEnabled property of the Interop service.) The <enableCreation> elements are only to allow outgoing synchronization to create new records, as opposed to only synchronizing with records that are already connected to work items.

If incoming synchronization is working, so that work items are being created when a CQ record is created, then if you modify one of those work items, does the change get synced back out to CQ? If so, then outgoing sync is enabled in general.

If you still have the information on how to enable debug tracing in the Jazz server for the Interop service, that could be useful in seeing what's happening for outgoing synchronization.

Hope all this helps.

John

permanent link
Gary Dang (59338955) | answered Jan 21 '08, 6:51 p.m.
cc/cq bridges (in/out) are working now.

lingering questions...

1) category-project sync rule - do I need to specify transform for it and also map the project name values?

2) do I always have to accept the change in Pending tab for change that are coming from CC even though CC stream is a single stream project?

3) I have not been able to map the CQ state to workitem state, can you point me to the steps for this?

permanent link
Geoffrey Clemm (30.1k33035) | answered Jan 21 '08, 9:58 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
WRT Question #2:

The ClearCase Workspace behavior is not affected by what kind of
ClearCase stream (or what kind of ClearCase branch-type) it is
associated with. So yes, changes from synchronization always have to be
explictly accepted into your ClearCase Workspace.

Cheers,
Geoff

gdang wrote:
cc/cq bridges (in/out) are working now.

lingering questions...

1) category-project sync rule - do I need to specify transform for it
and also map the project name values?

2) do I always have to accept the change in Pending tab for change
that are coming from CC even though CC stream is a single stream
project?

3) I have not been able to map the CQ state to workitem state, can you
point me to the steps for this?

permanent link
John Vasta (2.6k15) | answered Jan 22 '08, 9:56 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

1) category-project sync rule - do I need to specify transform for it and also map the project name values?


I'm not sure what you're asking - in your original post for this topic, you asked about mapping to work item categories, since your schema didn't have a "project" record type, and I responded with the possible approaches and a pointer to a wiki page on category mapping. If you still have questions, could you provide some more specific information about the CQ entities that you are trying to map to categories? Do you have a project-like record type, or are you trying to map some field of a record to a category?


3) I have not been able to map the CQ state to workitem state, can you point me to the steps for this?


In the beta 2 build, you use a "synthetic" property named "StateResolution" for both work items and CQ records. It's value can be just a state name (e.g. "Submitted"), or a combination of a state and a resolution value separated by a slash (e.g. "Resolved/Fixed"). You enumerate all the possible values for your work item work flow and CQ state transition matrix, and map them to each other in the sync rule. See the sample Workitem-Defect.xml file for how we did this for the work flow from the Eclipse Way process template and the CQ DefectTracking schema.

John
ClearQuest Connector Team

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.