Forums

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

Logged work copy using automation for JIRA

Janakiraman S
Contributor
January 18, 2022

Hi Team,

I am working with JIRA DC and Automation for JIRA. I am copying over the work logged in a Task to its parent Epic using the below expression. 

{{#=}}{{worklog.timeSpentSeconds}}/60{{/}}m

Appears to run fine for Work logged with single decimal places. e.g. if I log 1.5h, it gets logged properly. 

When I log 1.52h on the task, it ends up on the Parent as 15.2h (although in the log i see the value as 1.52) for my expression above. Not sure if this a bug in Automation for JIRA. 

Has any of you also run into such a situation? Any leads how to overcome this? 

Thanks & Regards,

Janaki.

1 answer

1 vote
Bill Sheboy
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.
January 18, 2022

Hi @Janakiraman S 

First thing, I am using Jira Cloud and not Server so my observations may be wrong.

I have noted that with JQL and other things in Jira, the time fields have discrete units of measure limits, probably related to the numeric conversion of values to whole minutes.  For example:

  • This works as a query: project = myProjectName AND updated > -1.5h
  • This works as a query: project = myProjectName AND updated > -1.55h
  • This throws an error: project = myProjectName AND updated > -1.51h
    • Date value '-1.51h' for field 'updated' is invalid. Valid formats include: 'yyyy/MM/dd HH:mm', 'yyyy-MM-dd HH:mm', 'yyyy/MM/dd', 'yyyy-MM-dd', or a period format e.g. '-5d', '4w 2d'.

1.5h and 1.55h convert to an even number of minutes and 1.51h does not.  So I wonder if this is leading to the issue.

Kind regards,
Bill

Janakiraman S
Contributor
January 19, 2022

Hi @Bill Sheboy , 

Thank you for replying. Couldn't understand what you are inferring / suggesting here. Can you please let know if you are suggesting that I have to adapt the math expression / is this a handling of Automation app? 

Thanks & Regards,

Janaki.

Bill Sheboy
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.
January 19, 2022

Hello! 

I wonder if Jira is incapable of handling a value which does not lead to an exact number of hours, minutes, seconds; this may be a binary/decimal/time representation and conversion issue.  That is, when you divide by 60 it is no longer possible to represent the value as a time, and so it cannot be stored in that field type.

You could contact the support team to confirm this behavior ( https://support.atlassian.com/contact/#/ ) or try truncating/rounding the values after the division.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events