Forums

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

JQL Question - Show Closed Jiras, that were resolved a week ago

Melissa C
Contributor
July 22, 2024

Hello, 

From my filter I want to show only the Jiras that were closed a week ago.

Is this possible ?

 

(issuefunction in issuesInEpics("filter = 163764")) AND (status = Closed AND Resolved >= startOfWeek(-1))

1 answer

1 vote
Trudy Claspill
Community Champion
July 22, 2024

Hello @Melissa C 

Let us assume that the above filter was run today - 2024-07-22.

The way you have the filter written currently using 

Resolved >= startOfWeek(-1)

...will get you all issues with a Resolved date that is equal to or greater than 2024-07-14. That would include issues with the Resolved date on the 14th, 15th, 16th, etc. up to and included today, the 22nd.

startOfWeek() is a reference to the Sunday of the current week (2024-07-21). Adding the parameter -1 indicates you want the Sunday of the previous week (2024-07-14).

Given that functionality of startOfWeek, can you clarify what you mean by the issues being closed "a week ago"?

Do you mean they were closed on exactly the date seven days before today? Or is there some date range you want to consider?

Perhaps if you provide some examples of Resolved dates for issue that you would and would not want included in the results, and the date the filter is being executed, then we can give you the correct guidance.

 

Melissa C
Contributor
July 23, 2024

@Trudy Claspill 

Thank you for the explanation!

To give more context here's how we would use this query, We have progress meeting on Monday morning, where we go over issues closed the previous week and those issues that have a sprint assigned and those that have not been scheduled

This jql gets me all the issues with a spring and those without -issuefunction in issuesInEpics("filter = 163764"), But this also give me ALL the closed issues. 

We only want to see those resolved in the previous week. 

  • This jql only gave me the closed items
    • issuefunction in issuesInEpics("filter = 163764") AND Resolved >= startOfWeek(-1)
  • This jql gave me issues that were outside me project
    • issuefunction in issuesInEpics("filter = 163764") OR Resolved >= startOfWeek(-1)
  • This jql gave me the same results as my original filter 
    • issuefunction in issuesInEpics("filter = 163764") OR Resolved >= startOfWeek(-1) AND project=XYZ
  • This jql gave me issues outside my project
    • project = "XYZ" AND (issuefunction in issuesInEpics("filter = 163764")) OR Resolved >= startOfWeek(-1) ORDER BY cf[11480] ASC

I'm at a loss there! help!

Trudy Claspill
Community Champion
July 23, 2024

issuefunction in issuesInEpics("filter = 163764") 

That part of your filter is getting you all issues that are children of Epics, from Epics that match the criteria of the filter with ID=163764.

What is the criteria of filter 163764? 

Do you really want to constrain the results to only issues that are children of the specified Epics? If you do, and you want to constrain the result set more to only the issues Resolved in the past calendar week (Sunday through Saturday) then use this filter

  • issuefunction in issuesInEpics("filter = 163764") AND Resolved >= startOfWeek(-1) and Resolved < startOfWeek()

If that does not get you what you want, please provide details about the filter you are using to select the Epics, and examples of issue that are included that you think should not be, and issues that are excluded that you think should be included.

Melissa C
Contributor
July 24, 2024

@Trudy Claspill  Thank you!

filter = 163764 = project = XYZ AND fixVersion = "2024-Q3" 

This filter is the base, It shows all of the Epics with a Fix Version of 2024-Q3 - These are all of the Epics that the Team will work on in Q3, in these Epics we have a number of Issues/Tasks that need to be completed.  To get all of the Issues in filter 163764, I use "issuefunction in issuesInEpics("filter = 163764") " which are all of the Tasks that need to be completed before we can complete the Epic. 

Those Issues/Task are assigned a sprint and that is what we would like to report on.  Items Closed in the last week and anything that is scheduled(has a sprint). 

This filter only gave me the Closed items (16) for the last week only, So these should show up with the open ones

  • issuefunction in issuesInEpics("filter = 163764") AND Resolved >= startOfWeek(-1) and Resolved < startOfWeek()

 

I thought maybe combine filters but that didnt' work either

 

Trudy Claspill
Community Champion
July 24, 2024

issuefunction in issuesInEpics("filter = 163764") AND ((Resolved >= startOfWeek(-1) and Resolved < startOfWeek()) or (statusCategory!=Done and sprint in openSprints()))

This will get your the items that were closed plus the not-done items that are in Active Sprints.

If you also want the items that are in planned but not started sprints then use:

issuefunction in issuesInEpics("filter = 163764") AND ((Resolved >= startOfWeek(-1) and Resolved < startOfWeek()) or (statusCategory!=Done and (sprint in openSprints() or sprint in futureSprints())))

The parentheses are very important in this filter because of the use of OR and AND.

Trudy Claspill
Community Champion
August 4, 2024

Hello @Melissa C 

With the response I provided were you able to solve your requirement?

If so, please consider clicking on the Accept Answer button to mark your Question as Solved.

If you have more questions about this solution, please let us know.

Suggest an answer

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

Atlassian Community Events