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.ComponentAccessor
import com.atlassian.jira.event.type.EventDispatchOption
import com.atlassian.jira.user.ApplicationUser
import java.sql.Timestamp
ApplicationUser 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.
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.