You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi,
I have two fields Date A and Date B, I would like to subtract these fields for example {Date A} - {Date B} and return the value in days or number is it possible? in the example above I use the number value and string value and the result is not as expected. I'm using the JWT CAlculated Number.
Result: Calculated Date-Time
Result: Calculated Number Field
Data Total N : 0
Hi @Fernando Passos ,
given your two fields and assuming Date B is the larger one, the expression should look like:
round({bbbbb} - {aaaaa}) / {DAY}
Please replace aaaaa and bbbbb with the field codes for Date A and Date B.
Since you might want to ensure that the calculation will only be executed if both fields are set, I'd recommend the following expression:
{aaaaa} != null AND {bbbbb} != null ? round({bbbbb} - {aaaaa}) / {DAY} : null
Cheers
Thorsten
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fernando,
I use Automation For Jira to do that. I created a number field then populate it with this:
{{issue.customfield_17152.diff(issue.customfield_16921).days}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
Thanks for the help, but we don't have automation for jira in the company, we have script runner, behavior and the JIRA workflow Toolbox. Can we achieve this result with the add-ons we have?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't use any of those. You would need to contact their support directly. Sorry.
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.
Please check Adaptavist Script runner library - https://library.adaptavist.com/
There you can find helpful scripts ready to use, e.g. - https://library.adaptavist.com/entity/calculate-the-difference-between-two-dates
Regards,
Sebastian
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.