[Rt-devel] Requstor validation

Tim Coles Tim_Coles at spring.com
Wed Sep 24 17:43:49 EDT 2008


Hi,

I am trying to implement validation for the Requestor, CC and AdminCC fields when creating a ticket using the webUI. This is to try and prevent pointless accounts being created and, more specifically, tickets being connected to nonexistent people. This validation should lookup each entry in one or both of the RT db and AD (depending on need) to check they already exist and if not would issue some kind of prompt to confirm that a new entry should be created.

I currently have this partially implemented in two places.

1) Borrowing the mechanism from the calendar popup I have a javascript popup (from a 'check' link at the end of each field) that does all the checking (in AD only so far) and presents a checkbox for each non-existant entry to confirm that you want to create a new account.

2) Using the 'BeforeCreate' callback I have more or less the same lookup as in 1) but this sets the skip_create variable (and loads the @results array with the failures) if it finds any non-existant entries until they can be confirmed or corrected. This check is really as a last resort to cover people who don't check what they type, ideally they would use the 'check' link mention in 1) first.

The problem I have is connecting the two. I was thinking of something like a hidden field on the create form (Create.html) that I could update from the popup with the list of new email addresses and then the BeforeCreate code would be able to use that list as a confirmation list. However I don't understand what I need to do to add a new hidden field to the form and have the value included upon submission. I did wonder about custom fields but I can't see a way to make it hidden and a visible solution would look a bit kludgy.

Adding the field wasn't a problem it is just getting the value into something like %ARGS that I can't get my head around.

Alternatively am I going about this the right way or is there a better way that I have missed completely?

Incidentally I am using 3.8.1

Thanks for any help you can give me!

Tim

________________________________________________________________________________
Spring Group plc is one of the UK's leading recruitment and staffing services companies and is an active member of the Recruitment and Employment Confederation (REC) and the Supplier Diversity Europe Forum. Our services encompass contract and permanent IT and technology staff, office and industrial staff, workforce management services and recruitment outsourcing (RO). Spring Technology is the winner of the 2008 Recruiter Awards for Excellence for 'Best IT Recruitment Firm'  and employs the REC 2008 'IT Contractor of the Year'.   To find out how Spring can help your organisation, please email enquiries at spring.com.
________________________________________________________________________________
The contents of this e-mail and any attachment(s) are strictly confidential and are solely for the person(s) at the e-mail address(es) above. If you are not an addressee, you may not disclose, distribute, copy or use this e-mail, and we request that you send an e-mail to postman at spring.com and delete this e-mail. Spring Group plc accepts no legal liability for the contents of this e-mail including any errors, interception or interference, as internet communications are not secure. Whilst Spring Group plc and the sender have taken every precaution to prevent transmission of computer viruses, should this inadvertently occur we do not accept any liability. Spring Group plc, Hazlitt House, 4 Bouverie Street, London, EC4Y 8AX. Registered in England, company number: 590054. Web: http://www.spring.com
________________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20080924/5becd07d/attachment.htm 


More information about the Rt-devel mailing list