A form-save trigger script for 'job' forms.
This script looks for a field 'Assignee' in the form file being passed to the server.
This field is expected to contain a username, and the script is checking if the name entered here is a known user.
This is done by running "p4 users [username]", and counting the number of records returned - either 1 or 0, in theory.
Jobs are rejected if the user does not exist, otherwise the trigger passes and all is well.
This is an example script.
It is not supported.
It includes some basic sanity checks, but would benefit from more robust exception-handling and testing.
Currently, it does little more than checking that 'p4' is available and that there's a valid login ticket.