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.
Can anyone suggest me a syntax so that I can include the link type also here?
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 .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ganesh Kumar Vary kindly mark both answers as accepted then, to help others in the community with similar problems. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ganesh Kumar Vary ,
You can try this ScriptRunner Validation:
issue.links != null ? issue.links.some(link => link.type.name == "Addresses") : true
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Juan Carlos Vera this solved my problem. Bothe solutions worked fine for me. I Appreciate the quick response.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.