Hello,
Upon submittal of a form in one of our service portals, we'd like to have 24 hours (or 1 day, however it needs to be interpreted) added to the system field, "Due Date." I've created this as a Behavior in ScriptRunner, but it's not working.
import java.sql.Timestamp
import java.util.concurrent.TimeUnit
def start = getFieldById("duedate")
def date = issueContext.created
def defaultValue = new Date(date.getTime() + TimeUnit.DAYS.toMillis(2)).format("dd/MMM/yy")
if (! start.getValue()) {
start.setFormValue(defaultValue)
}
Thanks in advance for any suggestions you can offer!