I have my own extension, which overrides DoCheckToWrite method of WorkOrder to prevent set end_date less than start_date.
In console:
- User wants to create a new ticket, and tries to create WorkOrder (with wrong end_date) via UserRequest creation form - it adds WorkOrder to list correctly (DoCheckToWrite is not called in this moment)
- When user tries to save ticker, DoCheckToWrite of WorkOrder fails and user gets error message, but ticket is already broken and cannot be saved.
Hi Kamil,
If you want the creation of the Ticket to fail if a sub-object such as a WorkOrder fails, then you must perform the Check of the WorkOrder dates also within the Ticket::CheckToWrite