Display Issue Closed Date and Time in filter navigation

Jira Admin October 25, 2012

Moving to JIRA OnDemand from 4.1.1. Our standalone instance included the JIRA Enhnacer plugin which allows the definition of a "Last Closed Date" custom field: a date field that displays the last closure date of the issue.

This is an important element in our reporting requirements. We are slowly figuring out how to modify the JQL for all those filters that include a Last Closed Date custom field working with the WAS operator, but we have not yet figured out how to include/display the date and time an issue was closed (last closed).

Any assistance in this matter will be greatly appreciated. Regards

1 answer

0 votes
Jobin Kuruvilla [Adaptavist]
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.
October 25, 2012

I don't think you can do it with WAS operator. Try to add a custom field and capture the current date in it in the workflow post function using 'Update Issue Custom Field' from JIRA Suite Utilities.

You can use that date field in the reports!

Jobin Kuruvilla [Adaptavist]
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.
October 25, 2012

Yes, it will work only for new issues. The data will be stored in customfieldvalye table but you can't add that if you not already in onDemand. If not, add those rows and reindex ;)

Make sure you increase sequence value, take JIRA offline while you do it etc!

Jira Admin October 25, 2012

Thank you for the prompt reply.

The use of the WAS operator is to replace a 'WHERE "Date Closed" > 2012-01-01' clause in JQL and any similar instances.

I am thinking along the same lines of your suggestion regarding a custom field that I can fill out using the %%CURRENT_DATETIME%% macro on a post function at the time of the workflow transition... however, this will work only for issues closed after I make the workflow change, not on those already existing.

To address this, I would have to populate the customfieldvalue table inserting a value for each issue's most recent closed date... the challenge is finding where in the database this information is stored... any suggestions? I am looking for the table that contains the timestamp for a transition to Closed and the ability to link this back to its issue...

Thank you

Jira Admin October 25, 2012

I have not mentioned that we have not yet migrated our data, do it would be possible for me to manipulate the database and populate the customfieldvalue table for older issues. Obviously this would be a delicate step and one which would require much attention.

Jira Admin October 25, 2012

After some quick database review, I have found the following SQL selection criteria will retrieve the closed date and time for all issues:

SELECT a.id, pkey, workflow_id, status, start_date  
FROM jiraissue a, os_currentstep b 
where workflow_id = entry_id and status = 'Closed';

Suggest an answer

Log in or Sign up to answer