Need Script(Code) to make epic link mandatory while creating the ticket

Ram Raj May 15, 2023

Hello, 

I need to make Epic link mandatory while creating ticket and we have only Script runner plugin, so can any please provide the script runner code to use it in the Create issue transition validator.

 

Thanks In Advance!!

1 answer

1 accepted

0 votes
Answer accepted
Steve Long -Evelon-
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.
May 15, 2023

Hi @Ram Raj

If you use a 'Simple Scripted Validator', you shouldn't need any code assuming that you want the Epic Link field to be mandatory all of the time - just select the field in question and an error message you want displayed. Docs for ref: https://docs.adaptavist.com/sr4js/latest/features/workflows/validators/built-in-validators/simple-scripted-validators

Hope that helps - Steve.

Ram Raj May 15, 2023

Thanks @Steve Long -Evelon-  for your responce.

i not familiar with coding for script runner, Please find the screenshot attached and help me which one we need to select to make the Epic Link field mandatory while creating issue and based on your response and also provide me with code if needed.validator.JPG

Appreciate for your Kind response!!

 

Thanks!

Ramakrishna

Like Steve Long -Evelon- likes this
Steve Long -Evelon-
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.
May 15, 2023

@Ram Raj the easiest way for yourself will be to select the 3rd option down - 'Field(s) required validator (ScriptRunner)' and then select the 'Epic Link' field!

Ram Raj May 16, 2023

Thanks @Steve Long -Evelon- 

I tried with your suggestion but it is not working, Please see the below screenshot for the same.

Please suggest anything if i am missing.

 

Capture.JPGEpic.JPG

Steve Long -Evelon-
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.
May 16, 2023

@Ram Raj it won't show a * next to the field (as you're not using field configuration), however if you press 'Create' and try to create the ticket, it should fail as expected.

Ram Raj May 16, 2023

@Steve Long -Evelon- Will Give a try to create Epic.

Ram Raj May 17, 2023

Thanks Steve!

 

It Worked.

 

Thanks Again!!

Suggest an answer

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

Atlassian Community Events