Hi Team, I'm trying to set the due date field to be set to today's date by select another field I tried few suggestions but I cannot make it, could anyone can help here? thanks in advance.
Hi,
You do it like so:
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.event.type.EventDispatchOptionimport com.atlassian.jira.user.ApplicationUserimport java.sql.TimestampApplicationUser currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()Timestamp currentDate = new Timestamp(System.currentTimeMillis())issue.setDueDate(currentDate)ComponentAccessor.getIssueManager().updateIssue(currentUser, issue, EventDispatchOption.ISSUE_UPDATED, false)
Hi Ivan,
Thanks for the reply, what I'm trying is when I create an issue I have the two fields due date(system field) and priority(select list drop-down), I need to auto-populate the due date field to today's date when I select any of the select list in the priority field.
Thanks,
Hemanth.
It looks like you're new here. Sign in or register to get started.