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.

The Log provides a simple overview of the process.

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.

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.
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.