Hi Folks,
I try to Edit the date field (post-function).I can't edit the date field of the current issue. Subsequently, instead of PMLOG-29, you need to use the key of the current issue.
This is my code
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.MutableIssue
import java.sql.Timestamp
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def dateCf = customFieldManager.getCustomFieldObject("customfield_11706")
def issue2 = ComponentAccessor.getIssueManager().getIssueByCurrentKey("PMLOG-29")
def updated = issue2.getUpdated()
issue2.setCustomFieldValue(dateCf, new Timestamp((new Date() + 2).time))
Any suggestions how to solve the problem? Thanks in advance.
Vladimir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.