Behaviour Script Runner help with regards to issue linking

Supriya.Mandale July 15, 2021

Hi ,

Could you provide your valuable suggestion over below requirement.

I want below requirement to be executed on transition.

If the External Ticket ID field contains the word TEST (can be queried with "TEST*") it should ask for at least 1 linked issue of type  Is Tested by linked to an Issue Type Test (Zephyr)

if this is possible using using Behaviour script

Regards

Supriya

2 answers

0 votes
Daniel Ebers
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.
July 19, 2021

Hi @Supriya.Mandale

agreeing with what Mohammed said I would recommend you to check documentation on the "Simple Scripted Validator" as outlined here:

https://scriptrunner.adaptavist.com/6.20.0/jira/recipes/workflow/validators/simple-scripted-validators.html#_checking_linked_issues

Basically you would need start to explore how to additionally bring the check for the "External Ticket ID" in. Then you should be able to copy the part for checking the link from documentation.

The code is therefore not 100% ready yet to use in your environment but with a bit of adaption and try-and-error I believe you can cover a good portion of the requirement.

Regards,
Daniel

0 votes
Mohammed Faisaluddin July 15, 2021

Hi Supriya 

what i would recommend for you to go with is a validator . That way the issue won't be transitioned , if the link is not available .

 

If you are talking about behavior that means you have script runner add-on on your instance .

 

you could write a simple scripted validator which validate the custom field value for the given value and henceforth allow the transition .

 

Note : It is a recommendation there may be different ways to it .

Suggest an answer

Log in or Sign up to answer