{{now.plusBusinessDays(“{{Object.“Days for Review”}}“)}} in Automation not working

Mark Higgins
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 14, 2024

Hello,

Is this possible? I have an Assets Attribute, called "Days to Review" and I want to use that to add to the current date, to set the Dure Date of a ticket.

When I enter the number directly, no issue, so {{now.plusBusinessDays(7)}} works fine.

The value of Object.Days to Review" is 7, as it says that in the log, and it is an Integer.

But it doesn't like it when I substitute the 7 to with the Object."Days to Review"?

Thanjs

Mark

1 answer

1 accepted

0 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 14, 2024

Hi Mark,

Can you share the rule that you have? Especially where it shows the log of the value for the asset object. Also, that seems strange to me to store that value in an asset object. What not just a regular field?

Or maybe try creating a variable based on the object, then use the variable in the formula. 

Mark Higgins
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 15, 2024

Hi @John Funk 

Thanks for responding, and I hope you can see this. 

I was thinking variable as well.

 

Automation 2024-04-15 170442.png

 

THe audit log shows that the Days for Review is 30, so I'm not sure where its going awry.

Days for Review 2024-04-15 170727.png

 

Thanks for responding.

Cheers

Mark

 

 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 15, 2024

Thanks for sharing! I am thinking maybe it's the double quotes on the outside of the outside part. You wouldn't use those with a variable so probably not here either.

Maybe take those off and try again. The inside ones should be good because that's what is used when the log returns a value. 

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 Leaders.
April 15, 2024

Hi @Mark Higgins 

Yes, and...to John's suggestion:

Did you notice there are curly quotation marks (i.e. smart quotes) in the expression rather than the generic, straight ones?  I do not believe the curly ones are supported in smart value expressions.

Kind regards,
Bill

Mark Higgins
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 15, 2024

Hi @John Funk and @Bill Sheboy 

Thankyou so much for taking the time for responding. 

I tried a variable, I removed the quotes, but in the end, another colleague of mine, found this:

{{#now}}func=plusBusinessDays({{Object.“Days for Review”}}) {{/}}

This works. 

I don't quite understand why the var diddn't work, but it kept throwing an error.

Thanks again.

Mark

 

Like John Funk likes this
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 Leaders.
April 15, 2024

I am glad to learn you have something that worked.  

The three possible reasons it did not with the other syntax are: the extra / incorrect quotation marks, the extra spaces in the expression, or for the Object it did not resolve inside the function.

One way to check stuff like this is to write it, piece by piece, to the audit log to check progress.  When it works (or stops working) the cause is revealed.

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events