Forums

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

JQL for individual time log, not overall task time log

Marine Redon
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.
December 1, 2022

I'm trying to set an automation to warn when a user enters an incorrect time spent by mistake (e.g. 800 weeks). 'timespent' seems to only look at the overall time logged on a task, not each instance of a user logging time. Is there a way to capture this?

1 answer

0 votes
Trudy Claspill
Community Champion
December 1, 2022

Hello @Marine Redon 

Welcome to the community.

Can you show us the rule you have constructed so far?

If you use the Work Logged trigger then you can use this smart value to get the time logged in that individual worklog:

{{worklog.timeSpent}}

You won't be able to use that in a JQL statement, though. There are no native functions that allow you to search for issues based on the time logged in individual worklog entries.

Marine Redon
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.
December 2, 2022

Hi @Trudy Claspill

Here is my automation so far:

Screenshot 2022-12-02 094503.png

Would changing 'timespent' to '{{worklog.timeSpent}}' allow me to do what I want? 

I'm trying to differentiate it because we might have tasks that go on for weeks, but no user should log more than a few days at a time.

Trudy Claspill
Community Champion
December 2, 2022

As I said, you can't use this smart value in a JQL because JQL doesn't support searching for issues based on times in individual worklogs.

Instead you would have to use an Advanced Compare condition.

Unfortunately the Timespent value is a string, so the comparison is done based on string comparison rather than numeric value comparison. If you're comparing that value to "5w" then an entry of "6d" would be evaluated as greater than "5w"

Screen Shot 2022-12-02 at 10.30.37 AM.png

 

I have not yet found information on specific steps to convert a Timespent value to a numeric value.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events