Spreadsheet-esq Web Input

Hello.

I’m looking for a solution to my conundrum (aren’t we all?)… We have a cabling request spreadsheet that we want to webify and fold into a ticketing and inventory tracking system. I’ve got RT 4 and AT 2 working fairly well together now, but I’m running into an issue trying to get the new ticket form for the cabling queue to work properly. For each ticket there will be anywhere from 1-20+ cable runs on the ticket, and they each need a source, destination, and other info attached to them. This is obvious on a spreadsheet, but I’m having a hard time translating it into Custom Fields. so something like

environment, source rack, source equipment, source port, destination rack, destination equipment
1e, 1sr, 1se, 1sp, 1dr, 1de
2e, 2sr, 2se, 2sp, 2dr, 2de
3e, 3sr, 3se, 3sp, 3dr, 3de

As you can see the number of discreet CFs quickly gets out of hand with something like this. I’m trying to avoid uploading attachments as separate entities but an attachment (simple Excel spreadsheet for example) that was translated into CFs would work.

Thank you for any suggestions helping me make this work correctly.

I just realized that there is a “table” button in the WYSIWYG. was thinking I could set a default ticket description as a table and do it that way. but it looks like the format isn’t maintained (the email is plain text with each table cell as it’s own line or mashed all on one line for history) so that won’t work…

had a few hits searching for “request tracker grid” but that looks like an output, not an input method.

hmm…

been playing aorund with this for a few day now. Able to design a table in the WYSIWYG and have it email out properly (by setting the contect to html in the templates) and show properly in the history (by pbypassing the scrubber). still having an issue populating the Description field on a new ticket though. any help is appreciated.

I managed to hack together my first callback from Create.html and it works (yay!) but it’s populating the WYSIWYG with unformatted text. if anyone knows how to make this pop as an actual table please shoot me a line.

<%init>
my $ARGSRef = $ARGS{‘ARGSRef’};
if ( $QueueObj->Name eq ‘Cabling’ ) {
$ARGSRef->{‘Content’} = ’

Source Rack Source Equip Source Port Dest Rack Dest Equip Notes
1 2 3 4 5 6
'; }

<%args>
$QueueObj => undef;
</%args>From: Lake, Seth M (Vangent)
Sent: Thursday, October 25, 2012 1:00 PM
To: rt-users@lists.bestpractical.com
Subject: RE: Spreadsheet-esq Web Input

I just realized that there is a “table” button in the WYSIWYG. was thinking I could set a default ticket description as a table and do it that way. but it looks like the format isn’t maintained (the email is plain text with each table cell as it’s own line or mashed all on one line for history) so that won’t work…

had a few hits searching for “request tracker grid” but that looks like an output, not an input method.

hmm…

still looking for any info on how to make the CKEditor pop with formatted text (for example on a quoted reply). any help is appreciated, thanks!

been playing aorund with this for a few day now. Able to design a table
in the WYSIWYG and have it email out properly (by setting the contect to
html in the templates) and show properly in the history (by pbypassing
the scrubber). still having an issue populating the Description field
on a new ticket though. any help is appreciated.

Rather than bypassing the scrubber, push the tags you need into
@RT::Interface::Web::SCRUBBER_ALLOWED_TAGS.

I managed to hack together my first callback from Create.html and it
works (yay!) but it’s populating the WYSIWYG with unformatted text. if
anyone knows how to make this pop as an actual table please shoot me a line.

All message boxes (Elements/MessageBox) start as s which are
then optionally upgraded to a rich text editor if preferred using
JavaScript. The assumption is that the always starts with
plain text and so it is HTML escaped before upgrading to the rich text
editor.

I’d investigate the CKEditor’s JS API docs for ways to set HTML content,
and then do that from your callback. Another option is setting the
MessageBox Content to HTML and then tricking RT into thinking it’s
already HTML escaped (by setting CKEditorEncoded appropriately), but
that sounds much more fragile and open to abuse.

BTW, your callback will want to check and make sure there isn’t already
Content, otherwise you’ll overwrite the submitted message every time.