It's all about the answers!

Ask a question

more flexibility in userid mapping for CQ Connectors


Chris Ratcliffe (2633330) | asked May 25 '09, 2:54 p.m.
I am investigating the setup of the ClearQuest connectors for our organization, and found the following information (https://jazz.net/jazzdocs/index.jsp?&topic=/com.ibm.team.connector.cq.doc/topics/c_prerequisites.html) :

"For users who will work in the ClearQuest Connector environment, you also must ensure that the Login field values of their ClearQuest user records match the User ID field values of their corresponding Jazz user records."

We use LDAP authentication in both CQ and RTC, however, getting this requirement met will be difficult at best. In our setup, we would like the Jazz userid:

Chris Ratcliffe
User ID (case sensitive): chrisr@ca.ibm.com
Email Address: chrisr@ca.ibm.com

to map to ClearQuest id:

Login: chrisr
Name: Chris Ratcliffe
Email: chrisr@ca.ibm.com

In otherwords, the User ID field of the Jazz record and the Login field of the CQ record don't match (and we would prefer not match), however we would still like a way to get the mapping setup. I relize that because the Email fields and the Name fields are not unique in the CQ database, those couldn't be used for one to one mappings, however, would it be feasible to add some sort of abstraction to the CQ Connectors or to the Jazz user record that would allow this flexible mapping? Something like a special CQ record with two fields combined to be the unique id of the record, those being Jazz_Userid and CQ_Login_ID. When determining the mapping, if a record didn't exist, then an attempt to use the default mapping could be done.

Thanks,
Chris

5 answers



permanent link
John Vasta (2.6k15) | answered May 26 '09, 10:32 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Actually, the documentation is just stating the easiest approach to take, where the CQ and Jazz login ids are the same. You can also use value mappings to connect dissimilar names. For your example, you would add a value mapping that maps external value "chrisr" to Jazz value "chrisr@ca.ibm.com". This would require you to edit your synchronization rule every time you wanted to add a mapping for another user.


I am investigating the setup of the ClearQuest connectors for our organization, and found the following information (https://jazz.net/jazzdocs/index.jsp?&topic=/com.ibm.team.connector.cq.doc/topics/c_prerequisites.html) :

"For users who will work in the ClearQuest Connector environment, you also must ensure that the Login field values of their ClearQuest user records match the User ID field values of their corresponding Jazz user records."

We use LDAP authentication in both CQ and RTC, however, getting this requirement met will be difficult at best. In our setup, we would like the Jazz userid:

Chris Ratcliffe
User ID (case sensitive): chrisr@ca.ibm.com
Email Address: chrisr@ca.ibm.com

to map to ClearQuest id:

Login: chrisr
Name: Chris Ratcliffe
Email: chrisr@ca.ibm.com

In otherwords, the User ID field of the Jazz record and the Login field of the CQ record don't match (and we would prefer not match), however we would still like a way to get the mapping setup. I relize that because the Email fields and the Name fields are not unique in the CQ database, those couldn't be used for one to one mappings, however, would it be feasible to add some sort of abstraction to the CQ Connectors or to the Jazz user record that would allow this flexible mapping? Something like a special CQ record with two fields combined to be the unique id of the record, those being Jazz_Userid and CQ_Login_ID. When determining the mapping, if a record didn't exist, then an attempt to use the default mapping could be done.

Thanks,
Chris

permanent link
Chris Ratcliffe (2633330) | answered May 26 '09, 11:12 a.m.
Thanks, I will give that a try.

Actually, the documentation is just stating the easiest approach to take, where the CQ and Jazz login ids are the same. You can also use value mappings to connect dissimilar names. For your example, you would add a value mapping that maps external value "chrisr" to Jazz value "chrisr@ca.ibm.com". This would require you to edit your synchronization rule every time you wanted to add a mapping for another user.


I am investigating the setup of the ClearQuest connectors for our organization, and found the following information (https://jazz.net/jazzdocs/index.jsp?&topic=/com.ibm.team.connector.cq.doc/topics/c_prerequisites.html) :

"For users who will work in the ClearQuest Connector environment, you also must ensure that the Login field values of their ClearQuest user records match the User ID field values of their corresponding Jazz user records."

We use LDAP authentication in both CQ and RTC, however, getting this requirement met will be difficult at best. In our setup, we would like the Jazz userid:

Chris Ratcliffe
User ID (case sensitive): chrisr@ca.ibm.com
Email Address: chrisr@ca.ibm.com

to map to ClearQuest id:

Login: chrisr
Name: Chris Ratcliffe
Email: chrisr@ca.ibm.com

In otherwords, the User ID field of the Jazz record and the Login field of the CQ record don't match (and we would prefer not match), however we would still like a way to get the mapping setup. I relize that because the Email fields and the Name fields are not unique in the CQ database, those couldn't be used for one to one mappings, however, would it be feasible to add some sort of abstraction to the CQ Connectors or to the Jazz user record that would allow this flexible mapping? Something like a special CQ record with two fields combined to be the unique id of the record, those being Jazz_Userid and CQ_Login_ID. When determining the mapping, if a record didn't exist, then an attempt to use the default mapping could be done.

Thanks,
Chris

permanent link
Chris Ratcliffe (2633330) | answered Jun 01 '09, 11:31 a.m.
So, in the mapping you described above, would that be in a synchronization rule for the ClearQuest user record to Jazz user record, and then the mapping in the Defect to WorkItem rule would reference the user record rule? Or would the mapping be done directly in the Defect to WorkItem rule for each field that is being mapped based on a ClearQuest user id? In either case, we have thousands of user ids that would need to be maintained. Is there a way for different Property Mapping entries to share a set of Value Mappings? Do either the Java or REST APIs offer the ability to modify synchronization rules from an external script?

Thanks, I will give that a try.

Actually, the documentation is just stating the easiest approach to take, where the CQ and Jazz login ids are the same. You can also use value mappings to connect dissimilar names. For your example, you would add a value mapping that maps external value "chrisr" to Jazz value "chrisr@ca.ibm.com". This would require you to edit your synchronization rule every time you wanted to add a mapping for another user.


I am investigating the setup of the ClearQuest connectors for our organization, and found the following information (https://jazz.net/jazzdocs/index.jsp?&topic=/com.ibm.team.connector.cq.doc/topics/c_prerequisites.html) :

"For users who will work in the ClearQuest Connector environment, you also must ensure that the Login field values of their ClearQuest user records match the User ID field values of their corresponding Jazz user records."

We use LDAP authentication in both CQ and RTC, however, getting this requirement met will be difficult at best. In our setup, we would like the Jazz userid:

Chris Ratcliffe
User ID (case sensitive): chrisr@ca.ibm.com
Email Address: chrisr@ca.ibm.com

to map to ClearQuest id:

Login: chrisr
Name: Chris Ratcliffe
Email: chrisr@ca.ibm.com

In otherwords, the User ID field of the Jazz record and the Login field of the CQ record don't match (and we would prefer not match), however we would still like a way to get the mapping setup. I relize that because the Email fields and the Name fields are not unique in the CQ database, those couldn't be used for one to one mappings, however, would it be feasible to add some sort of abstraction to the CQ Connectors or to the Jazz user record that would allow this flexible mapping? Something like a special CQ record with two fields combined to be the unique id of the record, those being Jazz_Userid and CQ_Login_ID. When determining the mapping, if a record didn't exist, then an attempt to use the default mapping could be done.

Thanks,
Chris

permanent link
John Vasta (2.6k15) | answered Jun 02 '09, 11:38 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
The mapping would be in the synchronization rule for CQ user records, since you want to map the value of the "login_name" field of the CQ user record to the "UserId" property of the Jazz Contributor item. Then, your Defect/WorkItem sync rule will just reference your user sync rule for any user-valued properties (e.g. "Created By", "Owned By"). So there is no need for multiple property mappings to share value mappings, since just the one property mapping in your user sync rule would have the value mappings.

There is an API for creating and modifying sync rules, and you can also generate an XML representation of a sync rule and import it. For the API, see the
com.ibm.team.interop.client.IInteropManager
interface for starters (and then follow references to the
ISyncRule
and related interfaces). The XML format is not documented and is not considered "official" API, but it's pretty obvious - if you just look at the Source page in the sync rule editor, or export a sync rule into an XML file, you should be able to figure out the format easily.

permanent link
Chris Ratcliffe (2633330) | answered Jun 10 '09, 11:17 a.m.
My setup doesn't seem to be working. In our situation, our Jazz user database is LDAP enabled, so I really don't want the cq connector to attempt to create userids, so when I setup my sync rule for the user records, I set up a single Property Mapping as Item Property UserId (Item Identifier), Synchronization = <none> and External property = login_name (External identifier). Then in the Value Mappings, I added just one entry, for myself, as the test id. Item Value = chrisr@ca.ibm.com and External Value = chrisr.

Then in the Defect/WorkItem sync rule, I included a Property mapping of Item Property = Owned By , Synchronization = In/Out, and External Property = Owner. Then in selected the user sync rule in the Reference synchronization rule as you suggested.

However, when I created a new defect in ClearQuest, and it synced to RTC, the connector created a new user id called chrisr, and put that into the Owned By field of the new work item, instead of setting it to chrisr@ca.ibm.com as my mapping requires.

I thought perhaps this is because the synchronization setting in my one property mapping in the user sync is set to <none>, so I set it to In instead. When I tried to create a new defect, the synchronization of the defect to workitem says Pending(Blocked) and its blocked on the incoming synchronization of the chrisr CQ user record. Its synchronization failed with this error:

Incoming at 6/10/09 11:01:13 AM EDT
Error occurred:
com.ibm.team.repository.common.StaleDataException: CRJAZ1317I User with the same user id "chrisr@ca.ibm.com" already exists.
existing user: "com.ibm.team.repository.common.model.impl.ContributorImpl@24752475 (stateId: , itemId: , origin: <unset>, immutable: true) (contextId: , modified: 2009-05-06 14:57:59.692, workingCopy: <unset>) (mergePredecessor: null, workingCopyPredecessor: <unset>, workingCopyMergePredecessor: <unset>, predecessor: ) (emailAddress: chrisr@ca.ibm.com, userId: chrisr@ca.ibm.com, name: Chris Ratcliffe, archived: false)"
new user: "com.ibm.team.repository.common.model.impl.ContributorImpl@3c363c36 (stateId: null, itemId: , origin: <unset>, immutable: false) (contextId: , modified: null, workingCopy: true) (mergePredecessor: null, workingCopyPredecessor: , workingCopyMergePredecessor: null, predecessor: null) (emailAddress: chrisr@ca.ibm.com, userId: chrisr@ca.ibm.com, name: Chris Ratcliffe, archived: true)"

which makes sense, because the chrisr@ca.ibm.com id does already exist, so it can't create it.

I am not sure what to do at this point. I think the right setup is to have the synchronization of the property mapping set to <none> but when it is set like that, no mapping seems to happen in the defect/work sync.

Additionally, I updated the Work Item in RTC to change the Owned By field from chrisr to chrisr@ca.ibm.com, and then force a sync out. The sync says Pending (blocked), and its blocked on "Synchronization status for chrisr@ca.ibm.com: Uninitialized". I don't understand why its trying to synchronize the chrisr@ca.ibm.com in RTC down into ClearQuest at all. The user sync rule certainly doesn't indicate that syncing the other way should be done.

Thanks for all your time looking into this problem with me.
Chris

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.