Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

referencing smart value to a date field to add days

Teodor Hoza
Contributor
May 10, 2022

Hi, has anyone attempted to add the result of a smart value to a date field?

I have a smart value that returns a number and I'm trying to add that number to a date field

E.g.

numberOfDays= 88
syntax:

{{issue.customfield_12345.plusDays(numberOfDays)}}

when I try doing this it does not work

3 answers

1 accepted

2 votes
Answer accepted
Stefan Salzl
Community Champion
May 10, 2022

Hi @Teodor Hoza 

Where does the numberOfDays come from? Is this also a field within the issue? 

Best
Stefan

Teodor Hoza
Contributor
May 11, 2022

Hi Stefan, the value comes from a Create Variable Card which calculates a number. I will share a screenshot.

Stefan Salzl
Community Champion
May 11, 2022

Hi @Teodor Hoza 

as far as I know variables are stored as rype of string. Could you try to convert to number within your calculation? (numberOfDays.toNumber)

Best
Stefan

Stefan Salzl
Community Champion
May 11, 2022

 

sorry @Teodor Hoza ,

the correct conversion is „asNumber“.

Best
Stefan

Teodor Hoza
Contributor
May 11, 2022

Hi @Stefan Salzl Worked perfectly! Thank you soooo much! 

Like # people like this
Stefan Salzl
Community Champion
May 11, 2022

AWESOME!!!! 🙌🎉

You´re welcome ;)

Like Teodor Hoza likes this
0 votes
Teodor Hoza
Contributor
May 11, 2022

@John Funk and @Stefan Salzl Please see these screenshots.

Capture1.PNGCapture2.PNG

0 votes
John Funk
Community Champion
May 10, 2022

Hi Teodor - can you share the rule that you have so far? 

Suggest an answer

Log in or Sign up to answer