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

Error in the JQL Query:

Maria Laura Borra
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 13, 2022 edited

Hi! I'm a newbie, if someone could help I would really appreciate it :) 

I've been working on Power BI for a while, using Jira as Data Source. I have been asked to bring data from Jira with a filter (saved search). It's possible? Where do I learn how to write it correctly? I get the error message...

On Jira advanced search: issueFunction in issuesInEpics("filter =Example1")

On Power query relative path: = p_api & p_request_search & "?maxResults=" & intMaxResults & "&jql=project=KEY AND (issueFunction in issuesInEpics(filter = 'Example1')) ORDER BY createdDate DESC" &
"&fields=key,issuetype,created,status,customfield_10100" & "&startAt="

Error:

DataSource.Error: Web.Contents failed to get contents from 'https://xx/rest/api/2/search?maxResults=100&jql=project=KEY%20AND%20(issueFunction%20in%20issuesInEpics(filter%20=%20'Example1'))%20ORDER%20BY%20createdDate%20DESC&fields=key,issuetype,created,status,customfield_10100&startAt=0' (400):
Details:
DataSourceKind=Web
DataSourcePath=https://xx/rest/api/2/search
Url=https://xx/rest/api/2/search?maxResults=100&jql=project=KEY%20AND%20(issueFunction%20in%20issuesInEpics(filter%20=%20'Example1'))%20ORDER%20BY%20createdDate%20DESC&fields=key,issuetype,created,status,customfield_10100&startAt=0

Thanks a lot! 

1 answer

0 votes
rahuldanwade
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.
July 13, 2022

Hello Maria,

The issuesInEpics() jql function accepts another JQL as an argument or parameter as a string.

So following are a few examples for your reference.

 issuesInEpics('filter = Example1')

OR

 issuesInEpics("filter = Example1")

OR

issuesInEpics("filter = 'multi words'")

Essentially, you could use single quotes for filter names or project names,s or custom field names made up of many words in double quotes or vice versa.

I hope it helps.

 

Thanks

Rahul

Maria Laura Borra
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 14, 2022

Hi Rahul!

It works in the Jira advanced search but it doesn't on the Power Bi... 

I write 

= p_api & p_request_search & "?maxResults=" & intMaxResults & "&jql=project=KEY AND issueFunction in issuesInEpics('filter = 'Example1'') ORDER BY createdDate DESC" &
"&fields=key,issuetype,created,status,customfield_10100" & "&startAt="

And I get:

{"errorMessages":["Error in the JQL Query: Expecting ')' or ',' but got 'Example1'. (line 1, character 58)"],"errors":{}}

 Thanks a lot! :) 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Upcoming Jira Events