Referenced WorkItems in a Document

Posts: 11
Joined: Tue Jul 31, 2018 1:03 pm

Referenced WorkItems in a Document

Postby fml » Tue Mar 12, 2019 1:03 pm

Dear all,
I try to find a possibility to generate e.g. a LiveReport with a Table Block Widget showing all WorkItems referenced (or not referenced) in a (or any) document.
Dieas someone now a smart possibility to adapt a Querry or ScriptBlock to answer this questions?

Best regards and thanks in advance

Posts: 20
Joined: Thu Jan 18, 2018 11:02 am
Location: Frauenauracher Str. 85, 91056 Erlangen

Re: Referenced WorkItems in a Document

Postby PatrickClaus » Tue Mar 12, 2019 2:08 pm

Dear fml,

if you want to do this over a ScriptBlock in a LiveReport page, my suggestion would be the following:

1) Try to access the IModuleManager provided by the Polarion OpenAPI, see here: ... nager.html

You can do this by calling: $trackerService.getModuleManager()
From there, you can query excluding unreferenced workitems by using the method:
getModuleWorkItemsQuery(IProject project, ILocation location, boolean excludeUnreferenced)


2) Or, if you have the direct IModule object (the Document object)
[see here which methods return IModule: ... odule.html ]

In the IModule Interface, there is the method getUnreferencedWorkItems() for your convenience.
See: ... odule.html

It probably requires some digging in the Polarion API to get all necessary info to query for the desired IModule Object. Remember that you can access different Managers and Services from the TrackerService, like IProjectService, IFolderService, etc.

Easy hack if you know a WorkItem within the document you want to filter would be:

Code: Select all


Hope this helps.
Good luck coding!
Best Regards,
Patrick Claus

External service provider at Valeo Siemens eAutomotive GmbH
Frauenauracher Str. 85
91056 Erlangen, Germany
Mail Address

Posts: 11
Joined: Tue Jul 31, 2018 1:03 pm

Re: Referenced WorkItems in a Document

Postby fml » Fri Mar 15, 2019 9:55 am

Dear Patrick,

thank you very much for the detailed description. Seems that there is no simpler way for this request. Unfortunately I am not very experienced in programming, so this is a bit hard for me, but I will try to manage it by the help of a more experienced colleague.

Best regards

Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: Baidu [Spider], deborapy3, Google [Bot], jackMl and 6 guests