Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Logged time is 30 mins more than the estimated time

Lakshmi CH
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.
March 19, 2025

 

Hi Team,

We want to exclude the tickets whose logged time is 30 minutes more than the estimated one.
Ex- if the time logged is 6h 45min and estimated is 6h, we want this in the report ,
but its showing with 6h 30m and estimated is 6h.

We are using scriptrunner jql function.


The query we are using is, and its showing all the tickets.

project = "TEST" AND issueFunction in expression("", "timespent > originalestimate + 1800")

2 answers

0 votes
Trudy Claspill
Community Champion
March 20, 2025

Hello @Lakshmi CH 

I don't have an environment to test this. I'm just referencing the documentation.

https://docs.adaptavist.com/sr4js/latest/features/jql-functions/included-jql-functions/calculations

The examples and explanation there show syntax only for adjusting the estimate by days/working days or weeks/working weeks. i.e. adding 5 days is done using the syntax

+ 5*d

You might need to use syntax to get the fraction of a day (or working day) equivalent to 30 minutes; i.e.

30 minutes is approximate 0.021 of the minutes in a 24 hour day
30 / (24*60) = 0.0208

So in that case maybe this syntax would work:

+ .021*d

Or if your global time tracking settings are 8 working hours per day:
30 / (8 * 60) = 0.0625

+ .0625*wd

0 votes
Philipp Sendek
Community Champion
March 20, 2025

Hi @Lakshmi CH

unfortunately, the feature isn't working on my test instance, so I have to answer out of my head.

The query looks good. Have you already tried 30m instead of "1800"? Also if it turns out that the "greater than" actually behaves like a "equal or greater", you could simply increase the value to your threshold + 1. (such as "1801" or "31m").

I hope that helps.

Greetings
Philipp


Lakshmi CH
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.
March 20, 2025

We are trying to add 30 mins threshold when comparing timespent and originalestimate. if we have originalestimate as 2 hrs, I want to add 30 mins to it and say, give me everything where timespent is more than originalestimate and 30 mins

Suggest an answer

Log in or Sign up to answer