Dear ALL,
would you know which is the syntax to get the second-last comment of a child issue?
I have tried the followings out but they haven't worked:
{{issue.subtasks.comments.getFromEnd(1).body}}
{{issue.subtasks.comments getFromEnd(1).body}}
Thanks in advance, Vincenzo.
As you know, there may be multiple child issues, and that's why .subtasks returns a list of issues. Therefore, you have to use get(0) if you are sure that there is at least one subtask.
{{issue.subtasks.get(0).comments.getFromEnd(1).body}}
If you have multiple subtasks and want to get the second-last comment from each, you can loop through them:
{{#issue.subtasks}}
{{comments.getFromEnd(1).body}}
{{/}}
or add a lookup issues and try same approach there for each issue.
I hope that helps
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.
This seems to be the same / related question as in your other thread: https://community.atlassian.com/t5/Jira-questions/Display-last-n-comments/qaq-p/1832584
Kind regards,
Bill
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.