Does a script based validator overwrite the precondition operation behaviour for attributes?
I have created a script to validate two date fields against each other where date 1 must be earlier then date 2. If they are OK you can proceed and save the WI.
But if they are not valid, you can still save the workitem - even though I have set the operation behaviour for Save WI and set these fields as Required attributes.
Is there a reason why the operation behaviour allows saving even if the fields are invalid and thrown an error message?
Here are the steps I completed to add the script to the attributes:
1. Created the attributes for the date fields.
2. Set the Save Work Item precondition for the fields in Operation Behaviour (Required attributes precondition.)
3. Created a script based validator.
4. Associated the JavaScript file to the attributes.
5. Made fields dependent on each other.
But if they are not valid, you can still save the workitem - even though I have set the operation behaviour for Save WI and set these fields as Required attributes.
Is there a reason why the operation behaviour allows saving even if the fields are invalid and thrown an error message?
Here are the steps I completed to add the script to the attributes:
1. Created the attributes for the date fields.
2. Set the Save Work Item precondition for the fields in Operation Behaviour (Required attributes precondition.)
3. Created a script based validator.
4. Associated the JavaScript file to the attributes.
5. Made fields dependent on each other.