It's all about the answers!

Ask a question

Image traceability in DNG


0
1
Sam Briggs (3769) | asked Jan 30 '15, 11:54 a.m.
Good Afternoon,

Including images in the rich text of a DOORS-Next Generation (DNG) artifact - let's call it artifact X - creates a separate 'File' format artifact - lets call it artifact Y - and 'inserts' it into artifact X. This occurs even if you paste the image from the clipboard.

My question is: is there ANY form of traceability between the picture artifact Y and the artifact X that it is inserted/embedded in?

I have developed a need for this as we have modules that artifacts are removed from when they are obsolete. However we wish to retain some of these artifacts rather than totally delete them from DNG, and so the obsolete artifacts are moved to an 'obsolete' folder. The issue is my method of detecting these artifacts that don't feature within the module (apply filter no modules listed in 'Where Used' attribute) do not filter out picture artifacts embedded in non-obsolete artifacts.

These image/file artifacts quickly build up in a project, and with no way of detecting where they are used it makes it hard to manage them. What is the proposed method of dealing with these artifacts?

Best

Sam

Comments
Sam Briggs commented Jan 30 '15, 12:00 p.m.

I suppose one argument is that artifact Y, a picture, is a separate piece of information to any text that might go with it in artifact X. So embedding is generally not a good idea as DNG philosophy breaks separate information into separate artifacts.

However in practice, this text MUST ALWAYS accompany the image. I wish to reuse a single artifact, containing text and a picture, in many locations throughout DNG.


Alastair Beadle commented Feb 02 '15, 4:22 a.m. | edited Feb 02 '15, 4:27 a.m.

Not an answer to your original question, but related info: I believe that you can avoid this double artefact effect by using the 'Artifacts'/'Upload Artifact' menu (rather than cut and paste or import image from within an existing artefact) and then including the resulting artefact into you module or collection using 'Add an Existing Artifact'.


Sam Briggs commented Feb 02 '15, 2:27 p.m.

Hi Alastair

Yes! Thanks. I recently found this and am I'm the process of convincing everyone not to succumb to the temptation of pasting, and instead updating the images.

Accepted answer


permanent link
Donald Nong (14.5k614) | answered Feb 01 '15, 11:17 p.m.
Literally, the image is "embedded" in the text - one simple way is the same as an image referenced in a HTML web page. So basically when you identify the artifact that becomes obsolete, you need to parse its "primaryText" to see if any image(s) referenced there. The tag is usually <img> but you can just search the link to the image itself as it is of the form "rm/wrappedResources/<uuid>".
Sam Briggs selected this answer as the correct answer

Comments
Sam Briggs commented Feb 02 '15, 2:35 p.m.

Hi Donald,

Thanks for your response. I believe this is what I would need to use.

Am I right in thinking there's no native way to detect this is DOORS-NG? My first instinct would be to use the 'Filter by attribute' feature to search the primary text / content of artifacts for "rm/wrappedResources/" however it is not possible to search for primary text of an artifact natively.

The other options that appear open to me are to laboriously 'find'/search through the REST response of all artifacts in a module for this string, OR to develop an extension that will do this job itself. Would you agree?

It seems a shame that there is no native support for finding this connection, and adequate management of the artifacts generated from embedding images requires DIY workarounds.

Best Regards,

Sam


Donald Nong commented Feb 05 '15, 4:19 a.m. | edited Feb 05 '15, 4:20 a.m.

I believe you need to take "the other options".

Note that the primary text is "rich text", which does allow images. When an image is pasted into the primary text, only the "wrapped resource" is created and the image is not an "artifact" at all. In other words, you don't have a handle of it.

When you upload the image first, you create an "artifact" that contains the "wrapped resource". But again, if a user uses "insert image" to put the image/artifact in the primary text (think a mix of text and images), you still have no way to find out which artifact contains images, as the primary text ends up with the same format as the "pasted" version.

If RM allows to search the word "wrappedResource" in the text, it will have some unexpected effect, as while you can relate the image you see to "wrappedResouce", you will have no clue when the text contains other "hidden" text. As in, if you search "font", almost all the artifacts will be returned in the result (the "font-size" HTML syntax is quite often used).

I do agree that there should be a feature to locate the "wrappedResource" (not just images), because if you delete it from the primary text, it becomes "orphaned". This should be an RFE candidate.

One other answer



permanent link
Robin Bater (3.4k47) | answered Jan 30 '15, 12:32 p.m.
JAZZ DEVELOPER
Not sure if this will help but once you have added an artifact to a module, you can select the artifact, right click and choose to explicitly add a artifact link from the menu.  You choose the link you want, which could be a custom link like "obsolete" or something similar,

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.