Get a search result for "status changed" between now and x days

Al Ba November 21, 2018

Hi all,

please help me to clarify my approach. I want as a result only Ticket #2, the ticket which status was changed between (now) and the last 15 days.

Example

Ticket #1: date of last status change 1st of October

Ticket #2: date of last status change 1st of November

Search is executed on 10th of November

Search query

project = abc AND status = xyz AND NOT status changed during (-15d, now())

Expected result

Ticket #2

Actual result

Ticket #1 + #2

 

2 answers

1 accepted

0 votes
Answer accepted
Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 21, 2018

Hi @Al Ba

I would use clause

status changed AFTER startOfDay(-15d)

to look into last 15 days

Al Ba November 21, 2018

Many thanks but it still does not work for me. 

I should mention that I have moved most of the tickets from another project to the current project (without that the status had changed). Could the move have impact on the search results?

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 21, 2018

Hi Alex

open an issue and look at the history or activity tabs to see if a status has changed.

I would assume moving from one project to another has set the matching status in the target project.

Al Ba November 21, 2018

I had matched the status of both projects before, therefore was no status change by moving the issues.

I will check the query in another project to understand if this is the reason for my results.

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 21, 2018

Hi

Did you mean the AND NOT status changed in your JQL?

Al Ba November 21, 2018

Maybe I don't get the logic right.

The query "AND NOT status changed AFTER startOfDay(-15d)" should give me results for tickets which had no status change between today minus 15 days, right?

This will logically include also tickets which had no status change in the date range before today minus 15 days.

But my goal is to query only the date range between today minus 15 days and exclude everything else. I think this is only possible if I extend the status-query with an argument which checks if the ticket was *updated* between today minus 15 days. What do you think?

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 21, 2018

Hi

to get the result you first mentioned - "the ticket which status was changed between (now) and the last 15 days." you need to check for status changes in that period.

status changed during (-15d, now())

if you use NOT  status changed during (-15d, now())

you'll get all this issues with status changes before 15 days ago.

The reason you are getting both items is that the clause will check any status changes not just the latest. so if status changes exist before -15d you will get those issues

sorry for delay , been offline today

Like # people like this
Al Ba November 23, 2018

Hi Tom,

many thanks for your reply and support - I understand now how I have to handle this.

0 votes
Alexey Matveev
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 21, 2018

Hello,

I just tried the same JQL query on my Jira Cloud instance and it works as expected. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events