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

Can you generate a document from a filtered view?

 Is it at all possible to create a template that will generate a document from the artifacts that are visible in a module's view, when the user chooses "Generate report from view" in Doors NG?

 

When I generate a document from a view where I have filtered the artifacts, I always end up with a document that contains all artifacts in the module, including those that are filtered out.

 

I have been trying to create such a template for a while, and have been scoured the web and this forum for hints on how to. I learned that it is possible to do in RPE/PUB (and succeded in doing it) by supplying a datasource URI that contains the view's name or URI and the project URI, but I find no information on how to get this information from Doors, or - if it is available somewhere -  extract it and use it in my template.

 

The preinstalled template printModuleTable implies that it may be retrieved by using some magic external variables "_viewURI" and "_projectURI", but I couldn't get that to work, and there seems to be no documentation whatever on this subject.

0 votes



2 answers

Permanent link

Using the built-in report on a view it will work with the current view, i.e. even when a filter has been applied that filter will be used when you generate a report for a view.


But AFAICT when using RPE you'll have to first save the filter in the view.

> variables "_viewURI" and "_projectURI" 

I'm guessing these are provided by DN to the template when generating the report.

The publishing whether from the internal report generator or RPE is done using the DOORS Next Reportable REST API https://jazz.net/wiki/bin/view/Main/DNGReportableRestAPI

For publishing views see this page: DNGModuleViewExternalRequest < Main < TWiki (jazz.net)

Here's an example of manually constructing a Reportable REST URL to get the data for a module view - this needs values for parameters moduleURI, viewURI, projectURI and the configuration oslc_config.context

On the module use the menu->Share Link to Artifact to get a URL like:
* https://jazz.ibm.com:9443/rm/resources/MD_tuvxFlEhEe2d5dG-54qhbg?oslc_config.context=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fcm%2Fstream%2F_tmYfMFEhEe2d5dG-54qhbg

The first bold text must be URL encoded for the moduleURI parameter value https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fresources%2FMD_tuvxFlEhEe2d5dG-54qhbg

The second bold text is the configuration URL for the oslc_config.context parameter - this is already URL encoded so can be copied literally.

On the view use the menu->Share Link to View to get a URL like this:
https://jazz.ibm.com:9443/rm/web#action=com.ibm.rdm.web.pages.showProjectDashboard&componentURI=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Frm-projects%2F_tg0CsFEhEe2d5dG-54qhbg%2Fcomponents%2F_tmM5AFEhEe2d5dG-54qhbg&filterId=VW_KObt0Ft4Ee6NQ8ZDZTg_AQ&vvc.configuration=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fcm%2Fstream%2F_tmYfMFEhEe2d5dG-54qhbg

In this the first bold text is the projectURI - this is already URL-encoded so can be copied literally

The second bold text is the viewURI which doesn't need URL encoding.

Assembled into a Reportable REST URL this is

This URL used in a logged-in browser tab returned the the XML results for the artifacts in the view.


0 votes

Comments

 My comment was too long, so I had to answer you outside this thread...


Permanent link

  Thank you Ian for replying.


> Using the built-in report on a view it will work with the current view, i.e. even when a filter has been applied that filter will be used when you generate a report for a view.

I didn't know that. Guess I have to dive deeper into the built-in reports to see if I can find what magic they do.

 

> > variables "_viewURI" and "_projectURI" 

> I'm guessing these are provided by DN to the template when generating the report.

Not when I try it. These variables don't get any value at all when generating from Doors. Niether does the REST URL that my template gets from Doors contain any _veiwURI or _projectURI part.

 

> Here's an example of manually constructing a Reportable REST URL to get the data for a module view - this needs values for parameters moduleURI, viewURI, projectURI and the configuration oslc_config.context

> …

 I have tried this and succeeded in getting the template to retrieve the filtered module by manually adding the _viewURI and _projectURI parts to my REST API URL, as described in that documentation.

 

But I really don't like the idea of having to create a separate template for each module and view that my users work with (or forcing them to figure out the view and project parts and provide them manually when generating the report - that is a recepie for disaster).

 

I guess that I have to dig deeper. But at least I now know that it should be possible, since the built-in reports can do it.

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 '23, 6:55 a.m.

Question was seen: 1,083 times

Last updated: Oct 03 '23, 4:44 a.m.

Confirmation Cancel Confirm