Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

ClearQuest import - how to map attributes from the XML?

Hi,

I'm using the ClearQuest Import function, and I've generated the XML/ZIP file from a query. The query includes the record's Submitter and Owner, but I've noticed some of the resulting XML files contain entries like
<Submitter name="Barney Rubble"></Submitter>
i.e. without a value in the text content. Is it possible to specify the name attribute as the sourceId for the com.ibm.team.workitem.attribute.creator/owner attributes in the mapping file, or can only the text content of the element be used to lookup the contributor attributeType's values?
I guess a workaround is to amend the query to extract Owner.fullname & Submitter.fullname rather than the top-level fields, and change the mapping file to use those for the sourceId instead. Just wondering if it's possible to get it working with the XML I've already got.


Andrew

0 votes



2 answers

Permanent link
Hello Andrew,

You can use the XML file you have, but the importer won't actually create the RTC users for the the (user related - owner/submitter) entries without a value in the text content. If you want the RTC user to be created, you need to make sure that the user related entries have email addresses as values.

Is this what you were asking? Not quite clear about your question.

Yuhong

Yuhong Yin

CC-RTC, CQ-RTC Connectors Team

0 votes


Permanent link
Hi Yuhong,

I've got entries in the mapping file for all the users, mapping to the RTC logins (which have already been created).
However, because the XML elements that have been exported from the CQ query don't always include the child text node (because not all the CQ users have an email address specified, I assume) I want to use the name attribute as the sourceId rather than the text content. So that e.g. when the generated XML has
<Submitter name="Barney Rubble"></Submitter>

I can use
<attributeType targetId="contributor">

<value sourceId="Barney Rubble" targetId="barneyr"/>
</attributeType>


I tried using
<attribute sourceId="Submitter/@name" targetId="com.ibm.team.workitem.attribute.creator"/>

on the off-chance it was using an xpath expression, but that didn't work. Is there any way to get the (mapping file) attribute to use the (exported XML) attribute (hope that's not too confusing!) or is my only option to change the query in CQ?


Andrew.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Sep 22 '11, 5:43 a.m.

Question was seen: 8,385 times

Last updated: Sep 22 '11, 5:43 a.m.

Confirmation Cancel Confirm