Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×customfield_27901 == "Parent Link", but the api will not let me filter on customfield_27901, only "Parent Link"
# 1) NO PARENT LINK CONDITION
url = f'{site}/rest/api/2/search?jql=project={epic_type}%20and%20created>' \
f'"2019-12-31"&fields=key,customfield_27901'
# customfield_27901_results == ['CHCAPABLTY-6327', None, None, None, None, 'CHCAPABLTY-6854', None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 'CHCAPABLTY-8860', 'CHCAPABLTY-8860', 'CHCA]]
# 2) PARENT LINK IS NOT NULL
url = f'{site}/rest/api/2/search?jql=project={epic_type}%20and%20created>' \
f'"2019-12-31"%20and%20%22Parent%20Link%22%20is%20not%20NULL&fields=key,customfield_27901'
# customfield_27901_results == ['CHCAPABLTY-6327', None, None, None, None, 'CHCAPABLTY-6854', None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 'CHCAPABLTY-8860', 'CHCAPABLTY-8860', 'CHCA]]
# 3) PARENT LINK IS NOT EMPTY
url = f'{site}/rest/api/2/search?jql=project={epic_type}%20and%20created>' \
f'"2019-12-31"%20and%20%22Parent%20Link%22%20is%20not%20EMPTY&fields=key,customfield_27901'
# customfield_27901_results == ['CHCAPABLTY-6327', None, None, None, None, 'CHCAPABLTY-6854', None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 'CHCAPABLTY-8860', 'CHCAPABLTY-8860', 'CHCA]]
# 4) PARENT LINK IS NULL
url = f'{site}/rest/api/2/search?jql=project={epic_type}%20and%20created>' \
f'"2019-12-31"%20and%20%22Parent%20Link%22%20is%20NULL&fields=key,customfield_27901'
# customfield_27901_results == [None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,]
# 5) PARENT LINK ~ "CH"
url = f'{site}/rest/api/2/search?jql=project={epic_type}%20and%20created>' \
f'"2019-12-31"%20and%20%22Parent%20Link%22%20~"CH"&fields=key,customfield_27901'
# customfield_27901_results == []
You can see 5 variations of a request and the results of each underneath the request.
My goal is to filter where Parent Link contains "CH' or at least where it's not null. Although I've implemented those conditions, the responses aren't right, as shown in 2), 3), 5) - Each still return null values.
The only filter which actually does something is 4), which filters for and returns only null values.
How can I get this filter working?
Hi @Josh Flori
Parent link has never been working for searching using JQL.
Hope this ticket will help you to understand why
https://jira.atlassian.com/browse/JPOSERVER-2477
Parent Link is not EMPTY considers 3 types of "parent links": Parent Link from Portfolio, Epics and subtasks. To search issues with only the Parent Link custom field present, exclude the other possible links:
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.