https://jira.atlassian.com/browse/JRACLOUD-75659
As per the above link, the issue is resolved but I'm still not able to use the custom smart variable as a function parameter.
e.g.
1. Create a custom variable in automation
lastcreated = {{attachment.created.max}}
2. logging {{now.diff(lastcreated)}} prints nothing.
How to resolve the issue?
Hi @nik_shivamprajapati ,
Developer from Automation here.
There is now the ability to use saved variables in smart value function calls, but currently the saved variables are stored as text instead of their original object/type so in this case your lastcreated is returning text instead of a date that would allow date functions.
To get this working you'll need to call toDate on that field when using it in your function e.g. {{now.diff(lastCreated.toDate).millis}}.
If you are still having issues feel free to leave a comment on that public issue: https://jira.atlassian.com/browse/JRACLOUD-75659 . Otherwise get in contact with support here: https://support.atlassian.com/
Cheers.
Just guessing here but shouldn't you encapsulate the smart value?
{{now.diff({{lastcreated}})}}
You can also start by just first logging
{{lastcreated}} on it's own to see if that returns anything
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is throwing an error
Above log is {{lastcreated}} and below one is {{now.diff({{lastcreated}})}}.
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.