Finding issues reopened in last week

Badger May 1, 2013

I would like to create a filter that shows issues that have been reopened in the last week, but there doesn't seem to be a 'reopened date'.

Does anyone have any suggestions for how I could do this?

Edit: we are using jira v5.1.1

7 answers

1 accepted

7 votes
Answer accepted
C_ Faysal
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.
May 2, 2013

what about the "status changed to" JQL syntax?

i.e.

status changed to Reopened BEFORE startOfWeek()

Udo Brand
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.
May 2, 2013

But better use

status changed to reopened during (startOfWeek(-1w),startOfWeek())

Badger May 2, 2013

Perfect, that's just what I was looking for, not sure how I missed the 'changed' operator in the docs. Thanks!

skorzinetzki May 2, 2013

This is nice, never heard of the changed operator! :)

C_ Faysal
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.
May 2, 2013

@Udo Brand yeah exactly

Badger May 2, 2013

'during' is cool too, not seen that either. When I said "during the last week" I meant "in the last seven days", so I'm actually using "changed to reopened after -1w"

Roman Kuznetsov May 2, 2013

+1 for "changed to"

It has a clear syntax and an additional predicate "FROM".

2 votes
skorzinetzki May 1, 2013

To get an exact clue of reopened issues you need to specify a custom field (reopendate) and add a post-function on the reopen transition that writes the current timestamp to the reopendate. with this, you are able to filter exactly those issues.

Tini Good
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.
May 1, 2013

This is an awesome suggestion, I'm going to try it as well.

Tini Good
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.
May 2, 2013

Done. I created the Custom Field ReopenDate and set the field type to Date Picker. Then I added a Post Function to all my workflows on the Reopen Issue transition (Update Issue Custom Field) as follows:

The ReopenDate of the issue will be set to %%CURRENT_DATETIME%%.

Then I temporarily added "Reopen Date" to my Default Screen so that I could manually update the field for existing issues that have been reopened but not yet closed, since they've already been through the transition. I'll probably remove that when done because I don't want users manually setting this field in the future.

Confirmed that I can query on this field for accurate information whether auto-filled as part of transition Post Function, or manually filled.

Only thing missing is that even when this custom field has data in it, it is not displaying in the Details section of individual issues.

skorzinetzki May 2, 2013

Are you sure the field is even missing, when it has value? I remember one custom field in our jira of type date, that shows up on the right side of the details view (under creation date etc), not in the regular information panel left.

Badger May 2, 2013

Thanks for pointing out how to do it without using a plugin - unfortunately as with plugins in our organisation any admin changes need a really good bussiness reason to go through.

Tini Good
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.
May 2, 2013

Went back and double-checked and it is not on the view issue screen anywhere. Not critical for this particular custom field, as I can see the date under the Transition Summary, and I don't need users interacting with the field. Just wish I understood when a custom field gets displayed and when it doesn't.

skorzinetzki May 2, 2013

Maybe check your field configuration?! Otherwise make it a new question.

2 votes
richie_gee
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 1, 2013

Hi there,

You can also achieve this by using Advance Search, JQL query like below:

project = TEST AND status = Reopened AND updatedDate >= "1w"

Hope this helps, cheers :)

Badger May 1, 2013

Nice idea, but our issues get updated (commented, reassigned etc) very regularly, so this would probably end up just showing pretty much all reopened issues I guess?

richie_gee
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 1, 2013

It is true, but I think this is thus far the most "economical" way of doing it :)

2 votes
darylchuah
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 1, 2013

Hi there

Perhaps you can try using JIRA Enhancer Plugin which could provide a First & Last Reopened Date Custom Field in JIRA.

Hope it helps!

Cheers :)

Badger May 1, 2013

Thanks, unfortunately we don't have that plugin currently, and our licence is for a few thousand users, plugins get quite expensive at that point so I won't be able to get it purchased without a *really* good reason either. Thanks for pointing this plugin out though, looks useful.

1 vote
Roman Kuznetsov May 1, 2013

Hi there,

I think you can do it without any plugins or tricks. Let me propose my solution using JQL with "WAS" operator:

project = TEST AND status WAS Reopened AFTER "-1w"

Cheers

skorzinetzki May 2, 2013

This could be a good idea if it works. But then one has to decide, is there a need to have the reopen date visible in the ticket? If so, then your solution will not fit, otherwise good and easy point!

Teck-En
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 2, 2013

I guessed unless you create a custom date field to track the reopen ticket(copy the value using post function) if you really need to view the date as well.

Otherwise, the JQL proposed by Roman should help you to retrieve the past week issues that been in reopen state. :)

Badger May 2, 2013

This is the kind of thing I was trying to do, I was thinking that the 'was' operator might help here, but I couldn't quite get the syntax right.

Based on what you suggested I'm now using the following query, which gives me all issues which are now reopened, but were in the 'resolved' status at some point in the last week. It's close enough to what I'm looking for. Thanks for pointing me in the right direction.

status = reopened AND status WAS resolved after "-1w"

skorzinetzki May 2, 2013

If this was the right solution for you, you can mark this answer as accepted! :)

Badger May 2, 2013

I was about to accept this as the answer (the 'status was reopened' syntax does work) but C. Faysal jumped in with a neater solution.

1 vote
Chaithra N
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.
May 1, 2013
0 votes
John Chin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 1, 2013

Hi Badger,

For the moment, JIRA do not have the filtering to show the issue of reopened history. However, I can introduce a plugin known as JIRA Enhancer Plugin that contain of custom field where record issue reopened date. To download the plugin please click the link below:

https://marketplace.atlassian.com/plugins/plugin.jep

You can try to test on it and see how it goes. Thanks, John

Ranjita July 17, 2017

so which query is most suitable to get reopened bug count for past week

Project = TEST AND issuetype = Bug AND status WAS Reopened AFTER "-1w"

or

Project = TEST AND issuetype = Bug AND status changed to reopened after -1w 

kindly suggest.

is there possiblity to get reopen bug count for any specific period than week using jql?

Suggest an answer

Log in or Sign up to answer