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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,878
Community Members
 
Community Events
184
Community Groups

Script Runner Validator to check if the issue is linked with a Specific link type.

Hi all,

I have a requirement where a User Story should be moved to next transition only if it is linked to another User Story with link type Addresses.

I have used a simple one-line Script: issue.links.length >0 in the Script runner Validator which is restricting the transition when there is no linked issue. But I couldn't find a way to include the link type in the validator. please see the SS attached for more detail.

Script Validator.png

 

Can anyone suggest me a syntax so that I can include the link type also here?

 

2 answers

2 accepted

3 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 27, 2023

Hi @Ganesh Kumar Vary 

I would use something like:

issue.links
.map(it =>it.type.name == "Addresses")
.filter(i => i == true)
.length > 0

Keep in mind that "Addresses" should the name of the link type, not the names of the inward/outward links .

Thank you @Alex Koxaras _Relational_  this solved my problem. I Appreciate the quick response.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 27, 2023

@Ganesh Kumar Vary kindly mark both answers as accepted then, to help others in the community with similar problems. Thank you!

0 votes
Answer accepted
Juan Carlos Vera
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 27, 2023 • edited

Hi @Ganesh Kumar Vary ,

You can try this ScriptRunner Validation:

 

issue.links != null ? issue.links.some(link => link.type.name == "Addresses") : true

Thank you @Juan Carlos Vera  this solved my problem. Bothe solutions worked fine for me. I Appreciate the quick response.

Can I check if the linked issue is a Specific issue Type here?

 

something like the linked issue type should be either Epic or Story issue type.

Suggest an answer

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

Atlassian Community Events