Getting last comment with lookupissue

Vikram K
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 17, 2024

Hi,

 

I am trying to generate an email when a sprint is closed with a list containing issue key, status & last comment. 

I am using lookupIssue for this, the other fields are populating fine. But Iam unable get the last comment with {{comments.last.body}}

please let know if I am using the right smart value 

Thanks

2 answers

0 votes
Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 18, 2024

Hi @Vikram K 

This works for me:

 {{#lookupIssues}} {{key}} {{comments.last.body}} {{/}}

Adding my automation rule and it's output below: (NOTE: my trigger is a "SCHEDULE")

image.pngimage.png

 

I even tried the same code block that you've mentioned in one of your previous comments

Gave me this output

image.png

0 votes
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 17, 2024

Hi @Vikram K 

I tried this and it also didn't work for me, strange!

Can you show us how you are trying to visualise the data once looked up?

Ste

Vikram K
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 18, 2024

@Stephen Wright _Elabor8_ 

 

I am having a list to show the issues in the Sprint. The key & summary seem to come up right, last comments seems to have the issue

Sprint Summary
<ul>
{{#lookupIssues}}
<li>{{key}} - {{summary}} - {{comments.last.body}}</li>
{{/}}
</ul>

 

 

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 18, 2024

Hi @Vikram K 

That does work for me, both your version and the option @Jehan Bhathena provided above.

And it works in both the comment field, and in email.

Ste

Like Jehan Bhathena likes this

Suggest an answer

Log in or Sign up to answer