Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with scriptrunner script validator to check RemoteLink field

Julia Petrova September 28, 2023

Hi Community,

I'm trying to create a validator in Script Runner to check if the issue has Remote Link to the Confluence page then transition can be performed.

Unfortunately I can't find any solution for that because there is no ID for the Remote Link field in Jira. Also I don't know is it possible to use API request in Script Runner validator to get remote link values. Maybe I'm too newby in Script Runner and just googled that wrongly.

I'm hoping someone in community could help me with that, I would appreciate any solutions to use.

Thanks in advance!

1 answer

0 votes
Tom Lister
Community Champion
October 6, 2023

Hi @Julia Petrova 

I couldn't see a way to do this but this is what I know

The scriptrunner validator is using jira expressions and not groovy code so the syntax is different

The issue links can be accessed using issue.links

e.g. issue.links.map(link => { name: link.type[link.direction], issue: link.linkedIssue.id }).length >0

But this doesn't include links to confluence

Even with rest the call /rest/api/3/issue/AA-9999 only shows the issue links

You can however get the confluence links using

/rest/api/3/issue/AA-9999/remotelinks

but I haven't found a jira expression equivalent of that and its not possible to use the REST API in a validator

I can load the issue object in the validator but it doesn't have any properties for remote links

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events