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

How I can validate customfield´s parent on create transition?

Angel September 18, 2024

Hi!

I want validate a value of select list (single choice) in parent issue on the create transition so I generate this expresión with scriptrunner, in the test is ok but when I tried to create an issue fails.

Another thing is that the issue parent's hierarchy is at level 2 (premium plan), so I tried executing the validator on the creation of an epic issue.

issue.parent != null && (issue.parent.issueType.name == "Project") && ((issue?.parent?.customfield_10061?.value == “agile”))

Or how would I restrict on the creation of epic issues only to issues type proyect (principal) with  customfield set with option "agile" 

Thanks

2 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
Max Lim _Adaptavist_
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.
September 21, 2024

Hi @Angel, I can confirm that `issue.parent` on create screen only works for subtasks. This is documented in Jira Expressions types.

I reproduce the problem and it works when I create a subtask. So, it doesn't work for other issues under Plans hierarchy.

You might want to raise this with Atlassian to add support.

 

1 vote
Dave Rosenlund _Trundl_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 18, 2024

Hello, @Angel. I moved your post to App Central because your question is about Scriptrunner, an Atlassian Marketplace app. 

If you don't happen to find your answer here, I suggest you contact the Scriptrunner support team directly for a faster response.

Best,

-dave

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events