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
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
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
2 answers
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
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
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
I can use
I tried using
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.
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.