Forums

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

JIRA function query by Sprint

Devendra Vasant Saykhedkar July 24, 2021

I am trying to query using JIRA function. However this query is not working. When I run this query using JQL in jira its working fine

project=ABC AND status=Closed and Sprint=1868

 

=JIRA("project=ABC AND status=Closed and Sprint=1868","issuekey,summary,created,reporter, Sprint",1000,1000)

 

Same query returns 91 records 

3 answers

0 votes
Daniel Ebers
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 29, 2021

Hi @Devendra Vasant Saykhedkar

I seem to understand to have two sprint fields ("sprint" and "sprint name") where the default in Jira is "sprint" - what is not working are the sprint functions like

Sprint in openSprints()

What is the exact output if you try the above, perhaps

"sprint name" in openSprints() 

for a different test?
To be honest I am not sure if the function works together with a custom field. There are contradictory reports visible from Community, also we seem to be lacking some details of your implementation here.

That means, you could try to use it with your custom field but as of now I am unsure about the results.
Probably referring to the customfield by it's ID instead of the name could be something to test.

For your second question to escaping, I am afraid, it worked in my example without the need of escaping. You still could try to bring a \ in. So it reads:

sprint = "August\'21 Sprint1"

Or did your question refer to a different query? Like Alexander/Suvradip said a more detailed explanation could help Community members to offer ideas.

Regards,
Daniel

Devendra Vasant Saykhedkar July 30, 2021

I am using Jira addin for google sheets - https://support.atlassian.com/jira-work-management/docs/use-jira-cloud-for-sheets/

This allows to query jira using Google sheet function JIRA. We can enter on google sheet cell 

=JIRA("project = ProjA order by createdDate desc", "issuekey,status.id,another column", 0, 10)

 

for this function I am not able to query on sprint field. However same query works for Google sheet add-in if I give it in below UIjiracloudforsheets.png

component is not EMPTY AND Sprint in ("Spring'21 Sprint1") AND status was in (Closed, Done) during ("2021-01-25 11:45", "2021-02-07 00:30")

Daniel Ebers
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.
August 1, 2021

Seeing you are on a Cloud Standard plan it should be possible to raise a support request with Atlassian on this one - the App seems officially supported and if I understood you right the queries are working okay but not as soon you are querying for a sprint.

https://marketplace.atlassian.com/apps/1220382/jira-cloud-for-google-sheets-official?tab=support&hosting=cloud

Support Site: https://support.atlassian.com/

0 votes
Alexander Bondarev
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 25, 2021

Hi, @Devendra Vasant Saykhedkar !

I can't understand with which JQL-query you got problem...

What is that:

=JIRA("project=ABC AND status=Closed and Sprint=1868","issuekey,summary,created,reporter, Sprint",1000,1000)

Can you share screens?

Devendra Vasant Saykhedkar July 26, 2021

@Alexander Bondarev  

Sprint field in our case is custom field Sprint which has sprint id and Sprint name of Type JIRA Software sprint field

I can query for specific sprint by using criteria like sprint = 1862 or sprint = "August'21 Sprint1"

However 'this does not work when I use it in JIRA function. Can you please suggest how to include this in the query for JIRA function. 

Need one more help I have single quote in Sprint name field how I can escape it in JIra function query 

Thanks for your help 

Alexander Bondarev
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 27, 2021

@Devendra Vasant Saykhedkar , what does "Jira functiion" mean in your understanding?

Like @Suvradip Paul told, here you can find all JQL's functions. What function do you use? 

Show us screen where we can see your jql-query and search results.

Devendra Vasant Saykhedkar July 28, 2021

@Alexander Bondarev  we are using jira add-in for google sheets and there is option to use 

0 votes
Suvradip Paul
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 24, 2021

Hi @Devendra Vasant Saykhedkar ,

Thanks for posting.

I am not sure what are you looking as per output. Could you please go through this jql functions documentation - https://support.atlassian.com/jira-service-management-cloud/docs/advanced-search-reference-jql-functions/ and try to reframe your query.

There is also a cheat sheet for JQL, check put this blog - https://www.atlassian.com/blog/jira-software/jql-the-most-flexible-way-to-search-jira-14.

Please accept the answer if it solves your query else respond and allow others to share input.

Cheers

Suvradip

Devendra Vasant Saykhedkar July 26, 2021

@Suvradip Paul Sprint field in our case is custom field Sprint which has sprint id and Sprint name of Type JIRA Software sprint field

I can query for specific sprint by using criteria like sprint = 1862 or sprint = "August'21 Sprint1"

However 'this does not work when I use it in Jira function. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events