From memory, a scripted field that does something like
def allComments = CommentManager.getComment(issue)
gets you a list of all the comments. What I can't remember is how it is sorted, but if it is by Id of the comments, then just grabbing the last element from it (as lastcomment) should get the comment, then you can say
return lastcomment.getBody()
To put the text into a scripted field. You might also want to add lastComment.getAuthroFullName() and lastComment.getCreated(). (And have a think about looking at the last user to amend it instead of original author)
Can you please attach link or which can explain me briefly.
Thanks,
SAI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should create a new custom field of type "scripted field", then go into Admin -> Scriptrunner -> scripted fields, and add a script to it.
That script should
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.
Thanks Nic Brough, i tried your steps and i successfully get the latest comment using script runner.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.