How to retrieve Advanced Links in ScriptRunner
STAGIL Advanced Links can be accessed in ScriptRunner in two different ways, depending on your use case and technical preferences.
Option 1: Using the STAGIL Advanced Links REST API
Advanced Links can be retrieved via the STAGIL Advanced Links REST API . ScriptRunner can call the API to fetch linked issues for a given source issue, parse the response, and then perform actions according to the script.
Option 2: Using Jira Issue Properties
Since Advanced Links values are stored in Jira issue properties, it is possible to retrieve linked issue information directly from Jira. Each Advanced Links field stores its data under an issue property with the key format sajc-field-{fieldId}.
https://{yourBaseURL}/rest/api/3/issue/{issueKey}/properties/sajc-field-{fieldId}To identify the field ID number go to Manage Apps → Advanced Links. Hover over the Advanced Link → find a URL in the lower left corner of the page with an ID number e.g. https://{yourBaseURL}/plugins/servlet/ac/de.stagil.jira.stagil-assets/stagil-assets-relations/relation?ac.relationId=13227&ac.direction=inward
Once the relevant issue property is retrieved, ScriptRunner can extract the linked issue key(s) and use them for further automation logic.