How to show Jira issue/filter last X number of comments

Jimmy January 31, 2022

Hi all

 

I am new to using Confluence. In one of my confluence page, I have inserted a Macro > Jira issue/filter to pull all information from 5 epics. I manage to do that by using the "key = EPIC number" and choose key, summary, type, created, updated, due date, assignee, reporter, proority, status, resolution. its works.

Now, I am thinking if I can allow x number of last comments per User story

1 answer

1 accepted

4 votes
Answer accepted
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 31, 2022

Hi @Jimmy 

Not natively; the Jira Issue/Filter macro is showing fields which are available as column data - there isn't a comment field as such.

We've gotten around this before using a custom field and automation - for example, we created a field called Last Comment:

  • Create a custom paragraph field, called Last Comment - it doesn't need to be on a screen
  • Create an Automation Rule to run whenever a comment is added, adding the last comment made into the custom field
  • Visualise this in Confluence, as a field selected in the macro

You could do something similar in your scenario.

I'd consider whether the last 5 comments is necessary though - if they're looking at that many, wouldn't it be easier to just click-through and look at the Issue itself?

Ste

Jimmy January 31, 2022

Thanks so much. Yes, seem like the easier way is to click through and look at the issue in Jira. 

Like Ste Wright likes this
Jim Sheedy
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!
October 27, 2022

Looking to display the last 3-5 comments on a JIRA Dashboard.. Currently displaying the last comment in a field called "Last Comment"

{{issue.comments.last.body}}

Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 26, 2022

Hi @Jim Sheedy 

It's possible - an alternative to the above smart value for last comment is...

{{issue.comments.getFromEnd(0).body}}

...but, you can change the "(0)" to get other comments also. So for example...

  • (1) - second to last comment
  • (2) - third from last comment
  • ...etc

It's dynamic so will update as you add more comments.

You'll still need to visualise the data though - so either a field per comment, or one multi-text field for all 3-5 comments.

Ste

annie
Contributor
February 13, 2024

How do you create an automation that copies the content of the last comment and pastes it into that field?

Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 23, 2024

Hi @annie 

You'll need to create the custom Paragraph field first - eg. Last Comment.

Then the rule will look something like this...

  • Trigger: Issue Commented
  • Action: Edit Issue
    • Field = Last Comment
      • Value = {{issue.comment.last.body}}

Ste

Like annie likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events