Skip to main content
Skip table of contents

Using OSLC Connect for Jira with Scriptrunner

Scriptrunner is a popular add-on in the Atlassian Jira ecosystem. It can be used for many applications with OSLC Connect for Jira. Since we are using standard Remote Links for storage ( Understanding OSLC Connect for Jira Link Storage ) It opens some interesting usages for teams. Including some of the following suggestions below.

Fast Searches

Jira does not normally index Remote Links. Scriptrunner has resolved this with its design and offers JQL functions that perform quickly.

Users can find the documentation → https://docs.adaptavist.com/sr4js/latest/features/jql-functions/included-jql-functions/issue-links

Of particular interest to us is the usage of linkedIssuesOfRemote. With this, we can perform searches such as the following.

All issues with tracks requirement links.

CODE
issueFunction in linkedIssuesOfRemote("relationship", "tracks requirement")

Searching based on a remote resource URL (for all issues related to a specific remote artifact)

CODE
issueFunction in linkedIssuesOfRemote("https://polar-21r1-brest.sodius.cloud/polarion/oslc/services/projects/drivepilot/workitems/DP-400")

Or find all Jira issues related to the “drivepilot” project (Since Polarion embeds the project key in the URL)

CODE
issueFunction in linkedIssuesOfRemote("https://polar-21r1-brest.sodius.cloud/polarion/oslc/services/projects/drivepilot/*")

Scriptrunner is very useful and flexible for searching large repositories (2 Million Issues and larger).

Automation Scripts

Scriptrunner allows us to write scripts in Groovy. We have used this to enable teams to update their OSLC links. You have lots of possibilities but we have found large value in two scenarios.

  1. Native with ScriptRunner, we can update Remote Links. This has been important as we have migrated users from other OSLC tools to OSLC Connect for Jira.

  2. We have opened up some of our APIs so that you can utilize OSLC Connect for Jira services to navigate to remote resources and update, add, or remove content. This has been important on data loading and migration of existing datasets. Occasionally, some customers want to do some project “clean-up” of links and use Scriptrunner to automate this.

We have examples of this in our developer section. Scriptrunner Examples

JavaScript errors detected

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

If this problem persists, please contact our support.