I'm creating a report in which the number of days until expiration must be calculated. The calculation works fine. The rounding does not. Here is what I have: date1, date2 and expDays.
date1 - set value to [now]
date2 - future date
expDays - number of days between
([entry.date2.timestamp]- [now])/86400000
I tried rounding by adding the function to the expression:
(ROUND([entry.date2.timestamp]- [now])/86400000, 2)
I also tried using field definition rule to round after the calculation (ROUND([entry.expDays], 2))
None of the above worked. I tested the ROUND function by using numbers in the place of dates and it didn't work with numbers either. Trying to figure out what I'm doing wrong in attempting to use the ROUND function.
If you are using this date format in Jira, you can use Jira smart values. The below link might be helpful for you.
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
Good morning,
The solution provided by you was it helpful? your response will be much appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Where do you use this code? I don't know what script this is and if it supports ROUND function but I'd ensure parentheses are properly placed to group the calculations correctly
ROUND(([entry.date2.timestamp] - [now]) / 86400000, 2)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.