Forums

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

Query for Epics delivered within a period

Mister Femi November 9, 2023

Hello, I get an error message when I run this query to find out how many epics weee delivered 30 days before or after it a date but get an error message and it doesn’t run. What am I doing wrong? 
Thanks 

Team = Atlas AND issuetype =
Epic AND status = Done AND
resolved >= startOfDay(-30d) AND resolved <= startOfDay(+ 30d)

1 answer

1 accepted

1 vote
Answer accepted
Laurie Sciutti
Community Champion
November 9, 2023

Hi @Mister Femi ~ what is the error message?

Mister Femi November 9, 2023

@Laurie Sciutti Here is the error message: Error in the JQL Query. The character ‘+’ is a reserved JQL character. You must enclose it in a string or use the escape ‘\u002b’ instead.

Laurie Sciutti
Community Champion
November 9, 2023

ah.  @Mister Femi ~ Firstly, you can't have anything resolved 30 days in the future.....

Laurie Sciutti
Community Champion
November 9, 2023

@Mister Femi ~ you could try using hours, but be sure to include it in quotes. 

 

resolved <= startOfDay("+8h")
Mister Femi November 9, 2023

@Laurie Sciutti  Thanks, I see your point. Back to main objective, can you suggest a query for epics resolved 30days before or after the target end date? 

Laurie Sciutti
Community Champion
November 9, 2023

@Mister Femi ~ it should look something like this (depending on what your Target End Date field resolves to / is named in your JQL):

 

Team = Atlas AND issuetype = Epic AND statuscategory = Done AND
"Target end" >= startOfDay(-30d) AND "Target end" <= startOfDay("+30d")
Laurie Sciutti
Community Champion
November 9, 2023

@Mister Femi ~ more accurately than my previous response:  if you are looking for issues resolved within a date range specified in another date field (i.e. Target end date), I believe this would require a plugin (like ScriptRunner), which allows for date comparisons.  If you use ScriptRunner, you could include something like:

 

issueFunction in dateCompare("", "resolved <= 'target end' +30d") and issueFunction in dateCompare("", "resolved >= 'target end' -30d")
issueFunction in dateCompare("", "resolutionDate < dueDate +1w")

 

Reference:  https://docs.adaptavist.com/sr4js/8.2.1/features/jql-functions/included-jql-functions/date#dateCompare 

Mister Femi November 9, 2023

Thanks @Laurie Sciutti You are a star. Thanks. Sadly, my org restricts plugins. So will try the query you suggested. Much appreciated 

Like Laurie Sciutti likes this
Laurie Sciutti
Community Champion
November 9, 2023

Sorry to hear that, @Mister Femi .  If you wouldn't mind accepting my answer I would appreciate it!

Suggest an answer

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

Atlassian Community Events