ValidateTicket
Note:
Note: If you are validating fields that are not user defined custom fields, for the sake of parsing efficiency, you may want to disable the inclusion of these fields in the XML of a change request (flat ticket). See Enabling/Disabling Inclusion of User-Defined Custom Traffic Fields in Flat Tickets (see Enable / disable inclusion of user-defined custom traffic fields in flat tickets).
Syntax
sub ValidateTicket
Description
This function is called for every change request that is created or modified via the Web interface. It receives the change request (when the change request is new) as well as changes to the fields in the change request as input. It returns a return code and a list of error messages, so as to validate the change request.
Configuration
By default, this hook is not called. To configure the hook, complete the procedure below. You can optionally configure the hook to validate change requests with traffic information.
To enable the ValidateTicket hook, use the generic procedure for overriding system defaults to set the configuration parameter ExternalValidateTicketFields to the value 1. For details, see Override FireFlow system defaults.
Note: After setting this parameter, you must restart FireFlow for the change to take affect. See Restarting FireFlow (see Restart FireFlow).
Input Parameters
$ticket |
A Perl hash reference containing a single key called flatTicket, which points to the flat ticket representation of the change request. Note: The hash will contain only data that was entered in the request form. The ID field will be set to "New". For details, see Flat Ticket Examples. |
$isModify |
A flag that says whether this is a newly created ticket, or a modification of an existing ticket. |
$changes |
A Perl hash of the changes for the ticket. In the case of a new ticket, this is all the values entered. If hook was called due to an action that modified the ticket, $changes contains a key named actionTargetStatus with the target status of the action. |
Return Values
A return code and a list of error messages.