Skip to main content
Skip table of contents

Generating OSLC Usage Statistics

Ever wanted to see how many OSLC Links your projects have? Did you want to ensure links are only occurring in specific projects? Did you ever want to know how the number of links is evolving?

All of these questions can be answered with some simple scripting in Scriptrunner. The attached script is designed to be used to analyze your projects, or to focus on a custom query scope to determine the number of links (and types of links) in your projects. It is a quick and easy way to see your usage profile.

Running the Script

When running the script in the script console, users should expect speedy results. For repositorys with a large volume of links it may take a little bit longer.

The output from script is a simple HTML Table with Projects & Link Type Counts.

image-20250814-173713.png

The Log provides a simple overview of the process.

image-20250814-174517.png

Using the output

While the table is helpful to review, most users want to retain and analyze these results. For this, we recommend copying and pasting these results into Excel.

image-20250814-173955.png

You can use Excel to do some calculations and sorting. You can also store historical outputs to use in analysis and graphs over time (and import into Python scripts).

The Script

The script is available for usage however you see fit. You can also modify it to extract additional data from the links (Understanding OSLC Connect for Jira Link Storage ) to suit your needs better. This is a simple example of the data that can be easily accessed with Scriptrunner.

oslcStatsFinal.groovy

Note our usage of the linkedissueofremote filter in the JQL. Without this filter our queries take much longer to complete. This helps us return only Jira Issues with OSLC Links.

JavaScript errors detected

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

If this problem persists, please contact our support.