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

Simple Scripted Validator for "Parent Link"

Julia
Contributor
December 21, 2022

I want to write a groovy simple scripted expression to check on issue creation if the "Parent Link" field on an Epic is filled out during the CREATE screen... I can't figure out how to access that field. 

I know that "parent" in issue.ParentObject for example is only referencing the parent of a subtask so I am stuck on how to access the "Parent Link" on an Epic. 

This is just an example of what I want to write. How do I write this to say "Parent Link is not EMPTY

 

issue.resolution.name != "Fixed"

 

1 answer

0 votes
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.
December 21, 2022

Hi @Julia 

Parent Link is a field reserved for Portfolio for Jira. If you add this field on a screen, and you don't have it you will get a message like the following:

Portfolio for Jira must be licensed for the parent link to be available.

If however you have Portfolio for Jira, then a script like:

issue.customfield_12345.value != null

Where 12345 is the id of the parent link on your instance.

Julia
Contributor
December 21, 2022

Screen Shot 2022-12-21 at 1.02.21 PM.png This is the error I get when I try that 

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.
December 21, 2022

@Julia write the following

issue.customfield_14201.key != null

and don't mind if the line is red. I've tried it on my instance and works fine. Test it and let me know if that works.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, ace, atlassian community event, donation, girls who code, women in tech, malala fund, plan international, kudos, community badge, badge, atlassian badge, International Women’s month, International Women’s Day, women's month, women's day

10 for Change at Atlassian Community Events

Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!

Join an Atlassian Community Event!
AUG Leaders

Upcoming Jira Events