Hi,
It appears that the smart variables don't render when used within functions. Here is variable DayOfStay that i pass into the function plusDays, however. It renders to nothing. How to use variable within function if possible. Thank you
Hi @Margots Kapacs
If DayOfStay is a custom variable created with the Variable component, then simply write on your smart value the .asNumber method:
{{issue.Check-in.plusDays(DayOfStay.asNumber)}}
Keep in mind that custom variable are treated, to my knowledge, as text. So when you try to add a text to a date, the date becomes null.
Let me know if that solved your problem!
Interesting! Suggestions/thoughts:Does the Date Of Stay field expect a certain formatting, that is, does it work if you e.g. add ".jqlDate" at the end?
Then again, it sounds very much like this weird problem: https://community.atlassian.com/t5/Jira-Software-questions/plusdays-function-not-working-when-I-pass-in-a-variable/qaq-p/1500605 ... from 2020. Is that really still a thing?? And does that workaround still do the trick, maybe? oO
Thank you Alex. It works by adding asNumber function at the end. Thank you for helping
It looks like you're new here. Sign in or register to get started.