We have a behaviour script
import java.text.SimpleDateFormat import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.datetime.DateTimeFormatterFactory import com.atlassian.jira.datetime.DateTimeStyle def oDate = getFieldById("customfield_16324").getValue() as Date def eDate = getFieldById("customfield_16325").getValue() def dateTimeFormatterFactory = ComponentAccessor.getComponentOfType(DateTimeFormatterFactory) def formatter = dateTimeFormatterFactory.formatter().forLoggedInUser().withStyle(DateTimeStyle.DATE_PICKER) def formatteddate = formatter.format(oDate) if ( ! eDate ) { getFieldById("customfield_16325").setFormValue(formatteddate) } if ( oDate != null) { getFieldById("customfield_16324").setReadOnly(true) } else { getFieldById("customfield_16324").setReadOnly(false) }
And when we are entering the date field and switching months the field populates while we switch months thus locking the field and setting the value of the next field we copy it to. Is there a way to ensure that the script does not execute until a value is entered in the field and the menu is not open to change months.
Hi Kevin,
I see what you mean. I am afraid that there is not an easy solution in that case. I suppose the best solution was to check the oDate for a specific month or date, instead of just checking for a value.
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.