I have the following math expression
{{#=}}({{issue.timetracking.timeSpentSeconds}}/60){{/}} Minutes
The latest request from the business is that they would like these rounded up to the nearest 15 minutes...for billing purposes.
I cannot figure out for the life of me how to do that.
Any ideas?
So you could use:
{{issue.timetracking.timeSpentSeconds.divide(900).ceil}}*15
@Paul O that actually wasn't working when I had 13 min logged, and when I went up to 48 min, it would round down to 45 min. However, I was able to finally get it to work with
{{#=}}(CEILING({{issue.timetracking.timeSpentSeconds}}/900)*15){{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interesting. I took a quick look to understand this a bit more. It seems that the field for time tracking is treated like an integer (rather than a jira custom field number type). When using the 'divide' operation in my example above, it will never return anything but a whole number. So using 'ceil' has no impact at all.
As you've found, you need to perform a 'math expression' e.g CEILING. It seems "numerical operations" (per https://support.atlassian.com/jira-software-cloud/docs/smart-values-math-expressions/ ) only apply to custom fields of the number type
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for the explanation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, maybe, and yes... ;^)
Have you investigated if your billing tools can do the rounding for you, outside of Jira?
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jeffrey, just to be clear: are you trying to permanently change the stored value of the time tracking or make a temporary adjustment only for the purpose of reporting?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I might want to change the value of the stored value (eventually), but for now I am just outputting to a different field for the finance team not to have to do their own rounding
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for confirming that info.
As you want to change the stored value I suspect your only options are to research other time-tracking tools from the marketplace with that capability, or to update with an adjustment value, either from the REST API or use an automation rule to log more time to round up. (That second approach of adjustment will definitely inflate the time tracking.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Reading below, I don't have a solution
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.