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.
Hello,
I would like to have a decimal for the Smart Value Variable that I'm creating {{futureVersion}}.
The format should be like this:
8.90
8.99
9.00
However, when I try it to be this way, it doesn't seem to take the format that I want, it just returns blank.
{{futureVersion.format("%.2f")}}
Help is appreciated, thank you.
What do you get when you have only {{futureVersion}}?
Hello @Sebastian Krzewiński
{{futureVersion}} is a smart variable that I created using this formula:
{{#=}}{{issue.description}}+0.01{{/}}
It correctly returns the value that I need, for example 9.
However, when I use the formula {{futureVersion.format("%.2f")}}, on another Action it doesn't return anything, it is left blank. If I remove the suffix .format("%.2f"), it can print 9 so I would like to know how can I format '9' to '9.0'.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I'm attaching screenshots of how I would like to make use of the futureVersion to have 2 decimal points.
I created smart variable futureVersion:
Then, I would like for that variable to have 2 decimal places:
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That was though one. Unfortunately I don't have good news for you.
I made few tests and I see that problem is that your variable based on text field (description). It is weird but you can make math operations on numbers in text field but format works only with number fields. I see a workaround for you: copy number from description to number field and then make all magic or switch description to number field.
Second thing - format. Your format didn't work for me. I made some test based on this link.
I tested 3 formats (customfield_10008 is number field):
Results are:
Hope that this will help you and you will resolve your issue :)
Seba
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Sebastian Krzewiński
Yes, I have the suspicion too that my variable (originated from Description) was treated as a String and not a number, that's why the format directly doesn't work *cry*
Thank you so much for the idea and kind help.
Estrella
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.