HiI have an automation that displays difference between two dates put in custom fields in Hours. I'm interested if it would be possible to have hours and minutes at the same time.
Smart value used is : {{[date1].diff([date2]).[unit]}}Thanks
Gosia
Hi @Małgorzata Adamska-Piotrowska
If you would use:
{{[date1].diff([date2]).prettyPrint}}
So don't use an specified unit option, but the prettyPrint option
Hi @Małgorzata Adamska-Piotrowska,
Try to use just {{[date1].diff([date2])}}
It will return difference in hours and minutes.
Hi. Thank for the suggestion. It doesn't work though.
My final action is set in Additional Fields section and after modification it looks like this.
{"fields": {"customfield_22188":"{{issue.customfield_21712.diff(issue.customfield_21713).prettyPrint}}"}}Should it be done in another way?
Hi- it doesn't work in my case.I use advanced settings to edit my field but without any unit the automation does not work.{"fields": {"customfield_22188":"{{issue.customfield_21712.diff(issue.customfield_21713)}}"}}
@Małgorzata Adamska-Piotrowska, what is the type of customfield_22188?
It's a Number Field.
I see in your reply to @Kseniia Trushnikova that customfield_22188 is a number field.
Then prettyPrin can't work as you store the result in a number field, that can only contain a number.
I think you should use a text field instead
Thanks. It worked without any unit but with prettyPrint option it doesn't.
Maybe there is also a trick somewhere else.
Hi
I have a similar problem. I want to update one custom filed (Cust_Response Duration) of type Short text, with the difference of current time and value in a custom date field. I am using the below smart value in my automation , but every time the rule runs , the Audit log shows "No Actions Performed" , Can anyone please help as to why the custom field "Cust_Response Durantion" is not getting updated .
Smart value which I have put in the automation rule for editing the custom field Cust_Response_Duration is :
{{now.diff(issue.Cust_Response Time)}}
Thanks
Sharmila
My issue is resolved now . Thanks
It looks like you're new here. Sign in or register to get started.