Forums

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

{{now}} function not working inside {{#lookupIssue}} section

Luiz-F Ferreira January 26, 2021

Hi to all,

 

I'm trying to build an automated email notification using Automation for Jira.

The automation workflow starts with a schedule trigger and follows directly to an "LookUp Issue" action and then to the "Send Email" action.

 

I was aiming to send a notification with the following format:

"Issue abc - X days since creation"

 

I tried to use the following format:

 

<ul>

{{#lookupIssue}} <li> {{key}} : {{created.diff(now).days}} days since creation. </li> {{/}}

</ul>

 

I've tried inverting the created.diff(now) to now.diff(created), saving the {{now}} result to a variable and using the variable inside the {{#lookupIssue}} section, but none of this works.

 

After some debbuging I concluded that I can't access any external smart value that is in the outter scope of {{lookupIssue}} section, or it seems to me it's something around that.

 

Does anyone have any suggestion on how I can accomplish this? or why the smart value can't be accessed from within the {{#lookupIssues}} scope, am I missing something or doing something wrong?

 

Thank you in advance

1 answer

1 accepted

1 vote
Answer accepted
Mark Chaimungkalanont
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 26, 2021

Hey there Luiz-F!

Yes that's a known bug. I've llinked the bug report here:

https://codebarrel.atlassian.net/browse/AUT-2119

There's no way to workaround this for the moment, unfortunately.

Cheers,

Mark C

Luiz-F Ferreira January 27, 2021

Thank you for the fast answer, Mark!

That explains a lot! 

I'll follow through the API route and watch the bug report.

Cheers

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer