Forums

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

Scriptrunner Script for Validation of a Custom Field Value and a Linked Issue

Bryan Trummer - ReleaseTEAM
Community Champion
June 29, 2023

Hello everyone,

I am trying to figure out a scriptrunner script for the following validator.

If customfield A's value = Yes - Authorized Change then verify a linked issue is present.

Even more ideal would be if it could verify if the linked issue is from a certain project.

The few scripts I have tried have given false positives.

I have not been able to find anything else online to help me create this script unfortunately.

2 answers

1 accepted

1 vote
Answer accepted
Sayed Bares _ServiceRocket_
Community Champion
July 6, 2023

@Bryan Trummer - ReleaseTEAM 

The following Jira expression should do the trick:

issue.customfield_xxxx?.value !='Yes - Internal Authorized Change' || issue.links.length !=0
Bryan Trummer - ReleaseTEAM
Community Champion
July 6, 2023

This did the trick! Thanks @Sayed Bares _ServiceRocket_ 

Like • Dave Liao likes this
0 votes
Craig Nodwell
Community Champion
July 1, 2023

Hi @Bryan Trummer - ReleaseTEAM inward our outward links?

Bryan Trummer - ReleaseTEAM
Community Champion
July 3, 2023

Hey @Craig Nodwell - Outward links. Honestly either or but maybe we can aim for outward links.

Suggest an answer

Log in or Sign up to answer