Skip to main content
Skip table of contents

Reporting OSLC Data with Siemens Polarion

Polarion provides resources to do reporting on OSLC Artifacts. These services include the essential ability to show the linked resources, and in later versions, API access to retrieve and display the values of OSLC Linked Artifacts.

Basic Reporting - Table Data

For most recent releases, the ability exists to add a column to your table data to show your linked Jira resources.

By creating a live report and adding a Table - Block, you can update the presented attributes to include linked data.

Your resulting configuration should look similar to the following:

You will have control of the scope and the query you are using; the linked data column only adds the ability to present the links to artifacts.

In this sample report, you can observe the contents you can expect.

Your Linked Data column presents the role relationship, title, and hyperlink to the foreign Jira artifacts.

This is just a basic report and doesn’t have a tremendous amount of details about the Jira artifacts, and only operates on data stored within Polarion.

Advanced Reports using the API - Starting in 21r2

In Polarion 21r2, Siemens provided some new APIs to enable users to report that remote linked data exists and include that data in reports (similar to their table appearances).

Using this API, we can do something similar to the following:

Using the following inline script to create this table.

PolarionInlineScript.txt

It is up to users to learn the Polarion API independently, but we can provide this example.

Using the Script Inline, we can produce the following basic script that generates a table and adds a column for OSLC link data. This simple script is performing a query to get a set of work items (note we have it set to limit 100), iterate over the workitems, and print attributes on each of these artifacts.

This script takes advantage of the new OSLC Resource Properties and the Rendering of these properties.

You can find these in your API help, but for reference, we are explicitly talking about finding properties on a resource by the attribute name.

You can see in the example simply the use of this data in the generation of an HTML page with dynamic content. We created some links, represented some custom data, and presented it in a report.

What will be critical is the reference of the property specification when retrieving a specific property. You will see that it follows the basic structure of:

CODE
$link.resource.property('{namespace}fieldname').render

What is important is the structure of that property name and the namespace-field name conjunction. You will be using the resource shape names from the artifact, so becoming familiar with the table references will help extract the namespaces and field names for these attributes. These can be referenced [update] Accessing Custom Jira Fields via OSLC .

For example, accessing and rendering the priority looks like the following:

CODE
$link.resource.property('{http://atlassian.com/ns/cm#}priority').render

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.