The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Adding value in request response to now

Ömer - OBSS
February 2, 2023

Hi everyone,

I'm trying to add the value from the rest response over the current date;

To access the variable i am using;

{{webhookResponse.body.table.body.rows.valueColumns.value.get(0)}}

This gives me a decimal number like 87.5 which represent hours.

I need to add this value on current date with plusHours method. I tried many methods but i couldn't make it;

{{now.plusHours( {{webhookResponse.body.table.body.rows.valueColumns.value.get(0)}} )}}
{{now.plusHours({{asNumber}}{{webhookResponse.body.table.body.rows.valueColumns.value.get(0)}})}}

{{#webhookResponse.body.table.body.rows.valueColumns}}{{now.plusHours({{value.get(0)}})}}{{/webhookResponse.body.table.body.rows.valueColumns}}

None of these methods work.

On cloud i am using Create Variable action to assign this value on a variable but on datacenter Create Variable action not available. So I am trying to use access directly to variable. 


I'm open to all advice, thanks !

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
February 28, 2023

Hi @Ömer - OBSS 

Once inside a set of curly-brackets you do not need to repeat them.  Please try this:

{{now.plusHours(webhookResponse.body.table.body.rows.valueColumns.value.get(0).asNumber)}}

Kind regards,
Bill

TAGS
AUG Leaders

Atlassian Community Events