Every time a user makes a change in the DueDate field I want to record the current Date/Time in a separate customfield called DueDate_Lastupdated.
This is not based on a workflow event so I guess the function has to be part of the DueDate field - yet I can not find any clue on how to do that.
I do have Scriptrunner available but so far I only found ways that don't work ;-)
Scriptrunner: 5.4.28
Jira: 7.12.1
Any idea on how to solve this issue?
Thanks in advance,
Bernd
Answered through our support portal:
import com.atlassian.jira.component.ComponentAccessor def changeHistoryManager = ComponentAccessor.changeHistoryManager def currentStatusName = issue?.status?.name def item = changeHistoryManager.getChangeItemsForField (issue, "duedate").reverse().first() return new Date(item.created.getTime())
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.