It's all about the answers!

Ask a question

Can you use DNG scripts to automatically add links to other requirements


Matthew Bradshaw (51315) | asked Jun 26 '15, 6:11 a.m.
I have just done an upload of lost of requirements into dng with a textual attribute for the "Old Ref ID".  Some of the artifacts are linked together with another attribute "Parent Ref" which is also textual and contains the "Old Ref ID"

Manually it would be possibel to go through them and add the links based on the values held in the boxes but we have hundreds of requirements.  I wanted to know if a script could be written to do this automatically, something like

For all parentRequirements
    Find childRequirements where parentRef == parentRequirement.oldRefID
    parentRequirement.addLink(artifact childRequirement, linkType child)
Loop

Let me know if this is possible and I will try to get it working, if not it will have to be a manual process.

Thanks

Comments
Francis Larocque commented Jan 08 '16, 4:00 p.m. | edited Feb 14 '16, 2:26 p.m.

Hi,

Did you succeed in your quest for a link creation script?

I'm actually looking to implement the same thing as I need to massively link thousands of artifacts together.

Thanks,

2 answers



permanent link
Corby James (5166) | answered Jun 26 '15, 11:11 a.m.
The API for DNG is limited.  Look for the rest API and examples on the wiki.  You can write javascript extensions.

permanent link
Donald Nong (14.5k414) | answered Jun 28 '15, 9:39 p.m.
This can be done using the OSLC API. Please refer to the below article, in particular the section "adding and removing links".
https://jazz.net/library/article/1197

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.