This is similar to this issue to this. I am able to use the #lookupIssue and retrieve elements from multiple issues, but I am not able to retrieve the last comment of each issue. Is this because I am not in the cloud version of JIRA? Below is what I have, where comment doesn't display:
{{#lookupIssues}}
{{#if(equals(status.name, "To Do"))}}
Ticket ID: {{key}}
Updated: {{updated.mediumDate}}
Summary: {{summary}}
Reporter: {{reporter.displayName}}
Assignee: {{assignee.displayName}}
Last Comment: {{comments.last.body}}
{{/}}
{{/}}
Ticket ID: Key-733
Also recieved suggestions on workarounds:
But any suggestions on what's the easiest considering the use case that I have?
Hi @henry_lin -- Welcome to the Atlassian Community!
For Jira Data Center, the Lookup Issues action does not yet support the Comments field:
https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
There are two possible workarounds to replace the Lookup Issues action usage, depending upon the situation:
You could use the first one for your case.
The second is needed when your rule is already using branching or when you need the issue data to edit another issue. For example, to sum such as Story Points into a parent Epic.
Kind regards,
Bill
Hello @henry_lin
Welcome to the Atlassian community.
According to the documentation for A4J in the latest Jira DC version, that should work.
https://confluence.atlassian.com/automation/jira-smart-values-issues-993924860.html#
As an experiment can you add a line to print the number of comments associated with each issue? i.e.
Comment count: {{comments.size}}
Last Comment: {{comments.last.body}}
{{/}}
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Trudy Claspill
Appreciate the quick reply! Implemented the {{comments.size}} and it returned a blank, but when looking at the specific ticket in JIRA, it does have comments, so I'm not sure why it's not returning me anything. For some reason, this only happens with #lookupIssue. If I remove this, I can retrieve the last comment for a single issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.