Hi,
I am trying to set the start date field based on some other parameter:
{{now.withYear(2024).withMonth(1).withDayOfMonth(15).plusDays(issue.Start PI)}}
The above works great, but I would like to have the following calculated inside the plusDays function:
(issue.Start PI - 3)
I have tried various variants, but nothing seems to work:
{{now.withYear(2024).withMonth(1).withDayOfMonth(15).plusDays({{#=}}{{issue.Start PI}} - 3{{/}})}}
or
{{#=}}now.withYear(2024).withMonth(1).withDayOfMonth(15).plusDays(issue.Start PI -3){{/}}
Any idea how to do this?
Thanks in advance
Arne
Ok, I never saw in the documentation the minus function, so the following solved my problem without creating another variable;
{{now.withYear(2024).withMonth(1).withDayOfMonth(15).plusDays(issue.Start PI.minus(3))}}
Hi Jovin,
I was looking for something like that, but did not find any info on that. Could you point me to some examples?
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.
Hey @Arne Henrichsen
Have you tried using "Create Variable" action before and performing the "{{issue.Start PI}} - 3" in that action?
Then you can refer to the variable as a number by then going {{smartValue.asNumber}} in the .plusDays?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have create a variable called daysOffset, but it is still not working:
{{now.withYear(2024).withMonth(1).withDayOfMonth(15).plusDays({{daysOffset}})}}
or
{{now.withYear(2024).withMonth(1).withDayOfMonth(15).plusDays(daysOffset)}}
On its own, {{daysOffset}} shows the correct number.
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.