How do I get a snapshot of issues on a particular day using JQL (rest)?

Tahir Rasheed December 23, 2016

Hi,

 

So I would like to get a snaphot of all issues on a particular day.So for example I want a snapshot of issues on the 20th of December:

project = MYPROJECT AND parent = MYPROJECT-3 AND status WAS NOT EMPTY DURING ("2016/12/20","2016/12/20")

However this also shows me issues that were created after the date I am interested in. How can I achieve this?

 

Best regard,

T.

2 answers

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 24, 2016

Your status clause is irrelevant because the status cannot be empty.  Your query is effectively "issues in myproject where the parent is myproject-3"

Tahir Rasheed December 24, 2016

Ok got it, so instead I'm using

 

 

project = MYPROJECT AND parent = MYPROJECT-3 AND status WAS IN ("status1", "status2", "status3") DURING ("2016/12/20","2016/12/20")

 

I couldnt find a way to use wildcards with status, is it possible?
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 24, 2016

Ah, good.

If by "wildcard", you mean you want to do something like "status name starts with/ends with/contains a string", then no, there's no way to do that, you need to lest each one individually.

Tahir Rasheed December 24, 2016

well, rather than using WAS IN (x,y,z) I'm interested in all status values so wanted to use WAS * to avoid explicitly listing each value.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 24, 2016

I'm sorry, but you've not understood my original answer.

An issue always has a status.  Always.  Saying "status was <any status I've got in my system>" means it will catch all issues, because they've always had a status. 

Could you explain to us what question you are really trying to ask here?   Forget JQL and status and dates, and just say what you're looking for in plain language.

Tahir Rasheed December 25, 2016

What I'd like to do is to get a snapshot of all issues that existed on a given date (in myproject and where the parent is myproject-3)

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 25, 2016

What do you mean by "snapshot"?

Tahir Rasheed December 27, 2016

Lets take an example

 

1/Jan/2016 has 3 'open' issues

2/Jan/2016 has 3 'open' issues and one was moved to 'in progress'

3/Jan/2016 has 2 'open' issues, one is 'closed' and another is 'in progress'

It is now the 20th of December and I want to pull out from JIRA a tab/comma separated list of all issues and their states on a given date - so the snapshot for 3/Jan/2016 will look something like

 

ISSUE-1 OPEN 'Some summary' ...other fields of interest....

ISSUE-2 CLOSED 'Some summary' ...other fields of interest....

ISSUE-3 'IN PROGRESS' 'Some summary' ...other fields of interest....

ISSUE-4 OPEN 'Some summary' ...other fields of interest....

 

The getting data into a tab/comma separated file is not an issue, it is how can I pull all issues on a given date irrespective of their status (so a snapshot of all issues on a given date)

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 27, 2016

There's two parts to this.

The selection is easy - "status was open between 1 Jan and 1 Jan" should fetch you what it says.  You can add more clauses to refine that to what you need.

Reporting is a bit more difficult because the issue navigator and others report on the current values.  So you'll need to be looking at the query to work out what you've selected.

1 vote
mlassau_atlassian
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.
January 8, 2017

Finding issues that existed on a certain date in JQL is easy (eg "createdDate < 2016-3-1").
This will return the current values for an issue, but IIUC you want to get the "snapshot" of what it looked like at that time.

JIRA does not provide a snapshot view of issues - perhaps this would be a useful improvement.
But it can provide a log of all changes an issue has gone through.
To get to this in REST you use "expand=changelog" eg:

https://jira.atlassian.com/rest/api/latest/search?jql=issue=JRA-99&expand=changelog

But realise that this will produce a LOT of data (network traffic, memory usage etc may be an issue?), and you will then need to process it yourself to calculate the snapshots at particular points in time.

Suggest an answer

Log in or Sign up to answer