Showing time difference on current (now) time

Ray Balmeo Cagayon April 10, 2024

I created a rule to measure the current date time against a target completion date but it seems that my results are being roundup somehow.

{{"Need By Date".diff(now).hours.abs}}

It seems to be working if the "Need By Date" value is too far away that i don't care the differences in hours but if the current time is now and my "Need By Date" is tomorrow, I am always getting a 24 answer which is a day away instead of 8 or 9 hours if its already in the afternoon.

I tried playing around with the now extensions but although the rule successfully I am not getting any results.

I am suspecting that since my "Need By Date" is a date field not a datetime field, Jira is purposely ignoring the time data.

I dont want to change the configuration of my "Need By Date" field so is there a way to trick it to format it to be a datetime.

 

 

 

 

 

 

 

 

1 answer

1 accepted

1 vote
Answer accepted
Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 10, 2024

Hi @Ray Balmeo Cagayon 

 

What type is Need By Date field? Is it date picker or date/time picker?

 

Regards,

Seba

Ray Balmeo Cagayon April 10, 2024

@Sebastian Krzewiński 

it’s a date picker. 

Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 10, 2024

You are making diif between field that store only date with now which is date/time. For automation diff will be based only on dates so diff will be always 24/48/72/96/etc. 

 

Regards,

Seba

Like Bill Sheboy likes this
Ray Balmeo Cagayon April 10, 2024

@Sebastian Krzewiński 

That's what i suspected as well. I'm getting the admins to change the field type.

 

 

Suggest an answer

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

Atlassian Community Events