Extracting the last comment?

Dr. Christian Jung April 11, 2013

Hi,

currently I'm testing the trial version v2.5.1 of the XPorter plugin. I'd like to extract the last comment.

${Subtasks[n].Comments[0].Body} works, of course, for the first comment, ${Subtasks[n].Comments[1].Body} for the second and so on. However, extracting the last comment with ${Subtasks[n].Comments[Last].Body} does not work. Also the expression ${Subtasks[n].Comments[${Subtasks[n].CommentsCount}-1].Body} does not the job, whereas ${Subtasks[n].CommentsCount} in fact gives the correct number of comments. I have also been trying to evaluate a Javascript %{...}, but unfortunately without success. Could somebody help me?

Best regards,

Christian


4 answers

1 accepted

0 votes
Answer accepted
Xpand IT Support Team
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 25, 2013

Hi Christian,

Release 2.5.3 has just been released.
You can access the First and the Last commens with the following notation:
${Comments[First].Field}
${Comments[Last].Field}

Examples:

${Comments[First].AuthorFullName}
${Comments[First].Body}
${Comments[Last].AuthorFullName}
${Comments[Last].Body}
Best Regards
Gajan Umapathy September 3, 2015

Hi, Can we customize how much of the last comment we can extract? Thanks, Gaj

0 votes
Joseph Kim May 14, 2014

where is the "last comment" field in the On-Demand version of JIRA??

0 votes
Dr. Christian Jung May 1, 2013

Hi,

many thanks for the quick solution.

Best regards,

Christian

0 votes
Xpand IT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 15, 2013

Hi Christian,

Currently it is not possible to do what you want.

It will be possible for the next release, which will be available during the next week. We will update this thread once it is available.

Best Regards

Mark Anderson August 1, 2016

so how do you do this is current version of cloud?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events