When i click on a transition i want to populate a custom field (Date) to the current days date + 10 days. Is that possible?
Thanks
import com.atlassian.jira.component.ComponentAccessor import java.sql.Date import java.sql.Timestamp import com.atlassian.jira.issue.util.DefaultIssueChangeHolder import com.atlassian.jira.issue.ModifiedValue def csDate2 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("test_date2")Date now = new Date( new java.util.Date().getTime() );
Date csNewDateValue= new Date( now.getTime() + 10*24*60*60*1000);
csDate2.updateValue(null, issue, new ModifiedValue("", (Object) csNewDateValue), new DefaultIssueChangeHolder())
Thanks for your help Alexey i didnt even see your reply.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Answer -
Set field value (JMWE add-on) - Due Date field - Groovy expression
Value:
issue.get("created") + 10
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.