You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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
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!
Thank you Alex. It works by adding asNumber function at the end. Thank you for helping
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.