Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Parent Custom Field Based on JQL Query in Scriptrunner Behavior JIRA DC

Digvijay Singh Gehlot
Contributor
April 20, 2025

Hi Community,

I want to hide a custom field (radio type) present on Parent issue based on JQL query,

Child filter: project = CHILD AND "Parent Link" = PARENT-XXX AND status != Done

when Parent is in Done but its Child issues are not in Done status yet.

Here, I am following Advanced Roadmap hierarchy and Parent issue type is Initiative and Child issue type is Portfolio Epic. So, the Child(ren) is linked to Parent via Parent Link field.

I need some help on how JQL query is called in groovy script and/ or make the use of searchService/ searchProvider in the code to fulfil the above request. 

Thanks

2 answers

Suggest an answer

Log in or Sign up to answer
2 votes
Dave Rosenlund _Trundl_
Community Champion
April 20, 2025

Hi, @Digvijay Singh Gehlot. This is a duplicate post of one you made the other day, but instead of mentioning Scriptrunner explicitly, you mention groovy scripts.

Generally speaking, duplicate posts are frowned upon for obvious reasons; but this also indicates your anxious for an answer. 

Have you tried reaching out to the Scriptrunner support team directly?

Digvijay Singh Gehlot
Contributor
April 20, 2025

Yes @Tinker Fadoua 

I am using below JQL query in normal search : 

Child Issues Filter:

project = CHILD AND "Parent Link" IS NOT Empty AND status = "Done"

Parent Issues JQL Query:

project = PARENT AND issueFunction in portfolioParentsOf("filter = 'Child Issues Filter'") AND status = "Done"

I want to know how to call the above JQL queries in scriptrunner behavior script so that I can show/hide the custom field present on Parent issue.

Thanks 

Tinker Fadoua
Community Champion
April 20, 2025

As @Dave Rosenlund _Trundl_  mentioned for a customized Script please reach out to Adaptavist. 

This is a link to all their documentation where you will see a link to raise a support ticket:

https://docs.adaptavist.com/sr4js/latest/features

All the best,

Fadoua

TAGS
AUG Leaders

Atlassian Community Events