How to copy the last comment date into a Custom DateTime Field ? Is this even possible ?
This should trigger when ever a new comment added to an issue.
Hi Andrian,
This requirement can be used using the Script Fields functionality provided by the ScriptRunner Plugin.
The way to do this is to set a new Script Field called Last Comment Added and configure its searcher type to be Date Time Range Picker and ensure this field is set to appear on issues for all projects and issue types.
You should then add the script below to the Script Field
import com.atlassian.jira.component.ComponentAccessor def comments = ComponentAccessor.getCommentManager()?.getComments(issue) // If the current Issue has comments then get the date that the last comment was created if (comments) { return comments.last()?.created as Date }
Finally you should then ensure that the Template for the field is set to Date Time Picker like in the screenshot below and then you will see details of when the latest comment was added such as in the screenshot below.
Screen Shot 2016-10-05 at 12.17.18.png
Screen Shot 2016-10-05 at 12.18.53.png
I hope this helps
Thanks
Kristian
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.