Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Scriptrunner - How to create validator to ensure issue is related to specific issue type?

I am new to scriptrunner validators and groovy. I would like to create a validator that ensures that the issue is Linked to another issue using "Related to" type of link, and that the linked issue is a specific issue type.

For example, something like this:

if (linked issue exists AND link type is "relates to" AND linked issue is issuetype = "Epic") {
} else {
Display error: "You must link this issue to an Epic using relates to"

We are currently trialing Jira and scriptrunner. This capability is paramount to giving us a successful "go head" for using Jira over other products. We are currently using scriptrunner for other capabilities so to be able to do this with as few addons as possible, I would prefer to do this with scriptrunner, while I know this may be easier to do with other addons like JMWE.

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 22, 2022

Welcome to the Atlassian Community!

You have labelled this with Cloud, but you mention scriptrunner and groovy, so I'd like to confirm if you are on Server or Cloud before writing the wrong essay!

The reason is that on Server/DC, you would write a validator script in groovy, which I can help you with, but on Cloud, validators are written as Jira expressions and I'm less familiar with them and would probably want to get us some help from the SR4C team (as mentioned in the docs) .

We are on Cloud.

Like Nic Brough -Adaptavist- likes this

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events