Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JQL Filter for time logged after closed

Hi, I would like to write an advanced search filter for searching of issues, where time was logged after it was closed. Does anyone can help me?

3 answers

1 vote

I think you can do it with groovy or script runner if you compare the values of the latest worklogDate and resolutionDate (if by closed you mean resolved, if you mean a particular status then you need the date of the transition). To achieve this there's a number of different things you need to consider.

Comparing two date fields.  This will be mandatory at some point or another. Go ahead and read this, and make some adjustment if needed. You could very well not need to change anything at all.

Getting transition dates, or any date for that matter. Just configure an automation so every time the transition is executed updates the value of a custom date field with the current date (or date time). Also you could store the date of any action you like... let's say every time time is logged to the issue you store the current date in a date field called "latest worklogDate".

Defining the JQL you're going to use. A convenient way (for me) would be a simple JQL. Something like customField_xxx=value. A flag, basically. You'll need then to create a custom field that takes the defined value if the desired condition is met, or use another operator (<, >, ...). Call it LateWorklog or something.

Creating a customField that acts as a flag. There may be lots of ways to do this. I personally use groovy custom field scripts. Using the code to compare two date fields you could create a custom field thar returns the difference in days or whatever between your closed status transition date and your latest worklog date.


With all this done, if your custom groovy script field compates your "latest worklogdate" and your "closed date" you could retrieve your desired list of issues searching  for "LateWorklog > 0".

I hope it helps 

1 vote
Fazila Ashraf Community Leader Feb 01, 2021

Hi @Natalia M. 

Looking at JQL functions from Scriptrunner and JQLtricks i do not think it is possible by status.

I does support date range though.

Have you looked at advanced reporting tools like eazybi or tableau?

I used automation to trigger an email if time is logged when the status is closed, could not find an JQL filter that could do it.

Trigger : When work logged

IF : status is ... (closed statuses)

Then: send email

Suggest an answer

Log in or Sign up to answer

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you