Extracting the last comment?

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
Accepted answer

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

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

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

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

Hi,

many thanks for the quick solution.

Best regards,

Christian

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 31, 2018 in Marketplace Apps

Marketplace Spotlight: Zephyr

Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...

413 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you