Forums

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

How do I map the filter at the top to my query?

Shaweta Nasa November 29, 2023

Hi,

I have created a report "Created vs Resolved" for tracking the issues created and resolved over time. 

For created, I have used the created in range -1w to 1w which shows me the data for one week. But I need to map this to Show filter. So, if I select show as 10 days, it should update my query to 10 days instead of 1 week.

Created_Issues.png

The JQL I have used is as below -

issuetype in standardIssueTypes() AND created >= -1w AND created <= 1w

Please suggest.

Thanks!

 

1 answer

1 accepted

2 votes
Answer accepted
David Friedrich
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.
November 29, 2023

Hi @Shaweta Nasa , Welcome to the Atlassian Community.

Can't you just use 

created >= -10d ?

Or am I misreading something in your question?

Shaweta Nasa November 29, 2023

Hi @David Friedrich ,

Thanks for the reply!

I can use -10d but I want it to calculate the days on whatever I select from "Show" dropdown. Kind of runtime vs putting a constant value.

Hope this explains.

Thanks!

David Friedrich
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.
November 29, 2023

Sorry, I'm afraid I do not understand what you are trying to achieve here...

The "Show" setting does set the range already, why would you need a range defined in your JQL additionally?

Besides I do not think that that would be possible as JQL doesn't work with variables in this sense.

Shaweta Nasa November 29, 2023

I am so sorry for the confusion! I just started exploring and not aware of the functionality of JQL.

Here is the query for resolved tickets -

issuetype in standardIssueTypes() AND status in (Canceled, Done, Resolved)

This one shows me the data based on the "show" filter as you said.

But then what should be the query for created tickets on a particular day? If I use Created in JQL , it asks me for the range of days. Lets say I selected -1w to 1w for a week's data. But if the user selects 10 days from the "show" filter, the data would not be correct because my JQL is pulling the data only for 7 days.

So, what should be the query for created tickets?

Thanks!

Like # people like this
David Friedrich
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.
November 29, 2023

No need to be sorry, all good.
I think I get it now.

"Created" is a predefined series. You just select it. The user of your report then decides what time frame he wants to look at via "Show" select.

image.png

Actually there already is a created vs resolved report ready to use in every JSM project.

Like Dave Mathijs likes this
Shaweta Nasa November 29, 2023

Awesome! I never thought of that. That did the trick!

Do we have any documents which explains all of these series and predefined functions?

How do we use filters? Lets say if I need to see tickets created/resolved by assignees, do we have any option?

Sorry to bug you!

Thanks much!

Like Dave Mathijs likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events