Hello all,
i'm trying to get Duedate base on value from assets, but i can't get any date at all..
here is my test enviroment :
automations :
Duedate : {{now.plusDays(issue.Contract.Invoice Expiry Days).jiraDate}},
{{issue.Contract.Invoice Expiry Days}}
{{now.plusDays(14).jiraDate}},
this is output :
Duedate : ,
14
2024-02-13,
as well i try to use another approach with creating variable, with needed number 14 but result is same...
can anyone help me ? or suggest some other possible solution ?
Thank you .
What is the field type for Invoice Expiry Days?
If it is text, you may need to add asNumber to convert it inside of the function call.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the source of that field? For example, is it a marketplace addon, and so may be a dynamically evaluated field?
For fields like that, the must first be set to a created variable to capture the value...as they often will not work inside of functions. And then the variable may be used in the function, converting to a number for your scenario.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what field you mean? issue.Contract.Invoice Expiry Days ? it's object in Issue field that is linked to Assets. i do not use any additional Apps or addosn,
and your suggestion to variable, i try that as well but result is the same, is there some possibility to check if variable is number?
Duedate with variable: {{now.plusDays(cas).jiraDate}},
{{cas}}
OUTPUT :
Duedate with variable: ,
14
and by default is the logic i using correct ?? it's possible to replace "14" with variable as i trying here {{now.plusDays(14).jiraDate}} ?? i did not found any specific documentation about this topic i just assume it could work, and it not showing any error ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that was the field I was asking about: {{issue.Contract.Invoice Expiry Days}}
I have not worked with assets and rules, and so I wonder if because their lookups are dynamic that it is not evaluated in time for passing to the function. So continuing to use the variable will help: based on your audit log results it is evaluated and saved.
Variables are text, and so I noted adding a conversion to use it as a number. Like this:
{{now.plusDays(cas.asNumber).jiraDate}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
THANK YOU !!!!!!!
{{now.plusDays(cas.asNumber).jiraDate}}
missing "asNumber" works !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; I am glad to learn that helped!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please explain what exactly you want to achieve. It is not clear what you want to achieve.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Harsh ,
I sending web POST request to invoice API, where i generating invoice payment, but i have different Invoice Expiry Days for different customers, so i want to use my variable from assets to send correct DueDate to invoice API
basically this is correct output when expire days is set to 14 :
{{now.plusDays(14).jiraDate}},
but the expire days is various .
i hope i explain it properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.
Register nowOnline 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.