Display Issue Closed Date and Time in filter navigation

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 vote

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!

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!

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

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.

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,187 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot