Hi Community,
after I have successfully made solutions disallowing past date in date custom field End of project the following problem occurred.
There is a Fixtermin field that has YES / NO values. If Fixtermin is YES then this option is valid and should disallow past date in date custom field End of project.
But if Fixtermin is set to NO, then this field End of project must be able to be left blank or any other value entered.
I have seen similar solutions here. Can anyone help?
Best regards
Jurica Petricevic
You would need to add a the same script to both you date field and your select field to be sure the rule is picked up whichever field is updated first:
def dateField = getFieldByName('End of project')
def conditionField = getFieldByName('Fixtermin')
dateField.clearError().setRequired(false)
if(conditionField.value == 'YES'){
if(dateField.value < new Date().clearTime()){
dateField.setError("You may not enter a date before today").setRequired(true)
}
}
If you have users in other timezones from the server, that might require some special considerations. Also, you will want to test scenarios where the issue is edited later.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.