It's all about the answers!

Ask a question

Is there a way to export the URI (if it is not already linked) from DNG to csv or xls?


Amy Grueninger (13) | asked Nov 05 '20, 12:05 p.m.

I am trying to export URIs so I can update via import to add linked artifacts. I need the full URI for the artifacts to manipulate the spreadsheet before I can import it back with an "influences" link.

4 answers



permanent link
Davyd Norris (1.1k7) | answered Nov 09 '20, 12:53 a.m.
You can create links via CSV import, or via the import of the ID into a custom attribute and then by using Link By Attribute.

When you're doing direct link creation you must make sure of the following:
 - the column name must reflect the Link type and direction
 - the Link name must be absolutely unambiguous. There must be only one Link type and direction with that name in your Project Area
 - cells must contain the link in the format {LINK id=<artefact id>}. Multiple links are simply concatenated up against each other
 - for OSLC links to other applications, <artefact id> is just the ID of the artefact
 - for requirement links, ID is either the unique DNG ID of the requirement artefact, in which case the link will be made to the base artefact itself, or a moduleID and artefactID separated by a full stop, in which case the link will be made to the artefact in the indicated module's context

Comments
Ian Barnard commented Nov 10 '20, 4:23 a.m. | edited Nov 10 '20, 4:25 a.m.
JAZZ DEVELOPER

 Some additional points:

  • For cross-component links the Link Type you want to use must have a URI and must have the same URI in both components. The URI is used to unambiguously identify the Link Type, so in principle you could have different names on the Link Type in each component, but don't do that: keep the names the same too.
  • For cross-component linking both ends must be in the global configuration or for non-GC the projects must be associated
  • If link constraints are in force the link must be allowed
  • Check that link creation is possible by manually trying to create an example link - if you can't create a link manually then import can't create links


permanent link
Ian Barnard (765612) | answered Nov 06 '20, 9:19 a.m.
JAZZ DEVELOPER
edited Nov 06 '20, 11:19 a.m.
Hi Amy

I don't think it's possible to export artifact URIs to CSV - but that doesn't matter because both using CSV import to create links, and using Link By Attributes utilise artifact IDs - the IDs can be exported to CSV for re-import without needing URIs.

Can you explain what you're trying to achieve, and why you think this needs artifact URIs?

Regards
Ian


Comments
Amy Grueninger commented Nov 09 '20, 2:52 p.m. | edited Nov 09 '20, 3:01 p.m.

Ian,

My user wants to export a list of requirements to excel, add a column and type in artifact IDs for 'Influences' link type and re-import it back in via CSV to update. I will research the Link by Attribute functionality because I tried what Davyd suggested below and it did not work.

*Sorry, I also just realized this was a custom link set up before my time. That might be adding to my confusing question.
Thanks,
Amy
 


permanent link
Brad Kile (131) | answered Nov 08 '20, 9:31 p.m.
Hi,

sorry to jump in on this thread but I had reached the conclusion that I too needed to export URIs as I thought it was the only way to upload links to other artifacts.

I exported a view that shows the links in a column 'Link:Link To (>)' and it would never upload the link regardless of whether I just put in the ID, or the ID plus description, or just the URI.  DOORS NG basically ignores those fields and will not upload links.

I had figured after a lot of searching that it just is not possible to upload links, whether by artifact ID or URI?

Happy to raise another thread Ian, but it sounds form your response that you can get csv to upload links using just the Artifact ID, but I just cannot get it to function.

Cheers,
Brad.

Comments
Ian Barnard commented Nov 09 '20, 2:55 a.m. | edited Nov 09 '20, 2:55 a.m.
JAZZ DEVELOPER
FYI you should be commenting not answering.

This works for me using e.g. {LINK id=4637} (see @Davyd's comments below too) and this can create either an incoming or outgoing link. I tried with a built in link type and a custom link type.


I'm using 7.0, linking core artifacts (but it does work for module artifact links), within one component.


Davyd Norris commented Nov 09 '20, 4:48 p.m. | edited Nov 09 '20, 4:50 p.m.
@Ian, @Brad - there is definitely a level of black magic to this, as I have had some clients who can't get it to work no matter what, and others who have no issues. One client could get it to work in a sandbox, but not in a production project supposedly set up in exactly the same way.

The rules I set out below seem to be how to get it to work but there has to be something else that needs to be right as well...

 - is the Link type being imported set up any differently? Is it only incoming or outgoing links that work? Do they have to have a URI set?
 - does it work with CSV but not Excel?
 - are there spaces somewhere in the column title or data?

I'm just grabbing at straws here!!

@Ian - I note you've said you got incoming and outgoing, and system defined and custom working (which I think is also my own experience but I've never explicitly quantified it). What about URIs on the link type? Did all yours have a URI set?

Brad Kile commented Nov 09 '20, 5:07 p.m.
@Ian, @Davyd - we are using version 6.0.6.1 so maybe the older version is an issue.  I have tried every variation with and without URI, custom and user-defined links, making sure exported views have correct headings, making views with only the artifact and link etc. but to no avail.  We will just use Link by Attribute for now.

Thanks for the help.

Cheers,
Brad.

Brad Kile commented Nov 09 '20, 5:16 p.m.

@Davyd - the black magic comment made my day, as this is exactly what we are experiencing :)  - little quirks here and there that require experimentation to verify...


Davyd Norris commented Nov 09 '20, 5:20 p.m.

@Brad - nope, I've used this technique since somewhere around version 3.0 and all of my current clients are on 6.0.6.1 at the moment because they are running on IBM's SaaS offering.


Ian Barnard commented Nov 10 '20, 3:29 a.m. | edited Nov 10 '20, 4:18 a.m.
JAZZ DEVELOPER
@Davyd I didn't have a URI on the link type - I don't see anyway how this would matter because the link type is identified by the column heading. I created both incoming and outgoing, even when the target/source was also in the CSV without it also being specified back to the other row's identifier.

@Brad - I'd expect this to work going back to 6.0.3 or earlier, unless there's a defect you're hitting - what iFix are you using?



Ian Barnard commented Nov 10 '20, 4:18 a.m.
JAZZ DEVELOPER

@Brad I started by creating a view - this obviously has to include the link column for the link you want to create. Then I exported to CSV not xlsx/xls, but only because my test env doesn't have Excel installed. Because the export was created by DOORS Next, I didn't modify the header row - so no added spaces etc. I would not be tempted to create the spreadsheet by hand, because it's so much simpler to create by export. In my export I specifically included an artifact with a link I'd manually created to give me a starter for 10. The exported cell shows e.g. {LINK id=4636 uri=https://jazz.ibm.com:9443/rm/resources/TX_O9z6ICJeEeurWpD5PSfzow} but you don't need the URI just the shorter form {LINK id=123}


You can create links across components but they have to be in-scope either because of a Global Configuration context covering both ends or by project association.

You must be careful not to modify the metadata in the export, below the rows of artifact content.


Ian Barnard commented Nov 10 '20, 4:19 a.m.
JAZZ DEVELOPER

Just done another test in a global configuration creating links between artifacts in different project/component - NOTE if doing this your link types must have the _same_ URI in both components and if link constraints are present then the link must be allowed - the simple way to check this is to try manually creating an example of the link you want - if you can't create it manually then import can't create them.

If you can't get it working I suggest you create a support case.

 


Brad Kile commented Nov 11 '20, 1:11 a.m.
I've had some really bizarre behavior in DOORS Next and just cannot pick a pattern or a reason for things not working. 

I started from scratch and created a new view with only the artifact and link columns.  I put in a link ID {LINK id=12345} and it worked!  But alas I tried a different link ID to another artifact and it didn't work.  Turns out the artifact that linked correctly was in a different folder than the one that would work.  I then tried another folder and some artifacts linked and some didn't.  Again I couldn't find a reason why some links worked and some didn't.  I then tried to move artifacts from a folder that contained artifacts that wouldn't link to a folder that contained artifacts that would link, and again the transferred artifact didn't link, but other artifacts in the same folder did work.




Brad Kile commented Nov 11 '20, 1:13 a.m.
Our subcontractor provided an excel file with heaps of cross references that I wanted to turn into links in DOORS, but I am going to have to find another way to enter the links.  Now working on creating modules with groups of links, and matching wording in excel to artifact IDs, then linking by attribute.

Thanks for your help, I did get some to work that way, but DOORS had other ideas and gremlins preventing some links an not others, and yes they were all the same artifact type, just in different folders...

showing 5 of 10 show 5 more comments

permanent link
Brad Kile (131) | answered Nov 09 '20, 1:16 a.m.
Thanks Davyd,

I exported my view and it contained the column 'Link:Assigned To (<)' (this is custom artifact type), and I added {LINK id=12345} where 12345 is the <artefact id> that I want to link to, and it does not work when I import the csv.

I changed other attributes in the same upload to double check everything else was working, but still no success on the links, it just plain ignores it, no upload errors.

I might have to try the second method of making the ID into a custom attribute.

Cheers,
Brad.

Comments
Davyd Norris commented Nov 09 '20, 1:42 a.m.
Hmm, I just tried doing it with

Link:Link From (<)

{LINK id=810865}

on my data and it worked fine. Can you try it with one of the built in link types and see if it works with that?

Your answer


Register or to post your answer.