Initiating tickets and entering tickets via forward

There are two things my users would like to do with RT. I have
figured a way to make these things happen (with a lot of custom
code), but am hoping there is something easier.

We use RT to manage distance education. The people asking for support
are students, the people monitoring the queues and resolving tickets
are instructors. The students never use RT directly - all of their
interaction is via email. Instructors use a mix of email and the RT
web interface to interact with tickets.

  1. Sometimes the students send an email directly to their instructor,
    rather than sending the email to RT first. We want those emails going
    through RT. Right now, the instructors have to go and create a
    ticket, copy/paste the email, then change the requester in the RT
    interface. THEN, they have to reply to the ticket, to let the student
    know that it is now in RT, and get a “proper” ticket that the student
    can then reply to (with ticket number in subject, RT as the reply-
    to). They would like to be able to forward the email to RT, and have
    the ticket be created with the original sender as the requester, them
    as the owner, and have a notification email sent to the student. I
    know I can write custom code for this - the question is, is there an
    easier way (or has someone already done it)?

  2. Instructors sometimes need to initiate a ticket with a student, as
    if the student was the requester (so that replies will go into RT,
    rather than to the instructor’s private email address). Again, right
    now they have to do this more-or-less manually by creating the ticket,
    changing requester, then reply to the ticket with their original
    information they wanted to convey. Is there a straightforward way to
    change the create function to do these steps automatically? One way I
    could do this is pre-populate a custom value, and then handle all
    this in a scrip during create ticket. But it seems messy to create a
    custom value that is only used once, essentially as an indicator.

Hi Jonathan

  1. Sometimes the students send an email directly to their instructor,
    rather than sending the email to RT first. We want those emails going
    through RT.

If your instructors have access to a decent email client, they can bounce/redirect the message straight into RT. There’s a great Thunderbird extension called Mail Redirect. It’s built-in to old-school clients like mutt. We’ve just been forcibly moved to Outlook/Exchange and it’s all gone pear shaped :frowning:

  1. Instructors sometimes need to initiate a ticket with a student, as
    if the student was the requester (so that replies will go into RT,
    rather than to the instructor’s private email address).

I’ve got a similar requirement. After a little thought - how about setting up a new queue that uses a queue specific Autoreply template that does nothing more than include the original message? Instructor goes:

New Ticket in → SpecialQueue
fill in student as requestor
set subject
write message
click send
[RT sends the On Create Autoreply which is just the text that the instructor added]
change queue to what it should be

Anyone see an issue with that?

Cheers
Toby

LEGAL NOTICE
Unless expressly stated otherwise, information contained in this
message is confidential. If this message is not intended for you,
please inform postmaster@ccdc.cam.ac.uk and delete the message.
The Cambridge Crystallographic Data Centre is a company Limited
by Guarantee and a Registered Charity.
Registered in England No. 2155347 Registered Charity No. 800579
Registered office 12 Union Road, Cambridge CB2 1EZ.

  1. Instructors sometimes need to initiate a ticket with a student, as
    if the student was the requester (so that replies will go into RT,
    rather than to the instructor’s private email address). Again, right
    now they have to do this more-or-less manually by creating the ticket,
    changing requester, then reply to the ticket with their original
    information they wanted to convey. Is there a straightforward way to

Why do they have to change requestor? Our users are able to specify
someone else as the requestor upon ticket creation. They then need
only reply afterwards.

Cambridge Energy Alliance: Save money. Save the planet.

Hi Jonathan

  1. Sometimes the students send an email directly to their
    instructor,
    rather than sending the email to RT first. We want those emails
    going
    through RT.

If your instructors have access to a decent email client, they can
bounce/redirect the message straight into RT. There’s a great
Thunderbird extension called Mail Redirect. It’s built-in to old-
school clients like mutt. We’ve just been forcibly moved to Outlook/
Exchange and it’s all gone pear shaped :frowning:

This works beautifully (and is SO much easier than what I was
contemplating doing…).

Thanks!

  1. Instructors sometimes need to initiate a ticket with a student,
    as
    if the student was the requester (so that replies will go into RT,
    rather than to the instructor’s private email address).

I’ve got a similar requirement. After a little thought - how about
setting up a new queue that uses a queue specific Autoreply template
that does nothing more than include the original message? Instructor
goes:

New Ticket in → SpecialQueue
fill in student as requestor
set subject
write message
click send
[RT sends the On Create Autoreply which is just the text that the
instructor added]
change queue to what it should be

Anyone see an issue with that?

This is a good idea. However, we have to support lots of classes, and
I don’t relish the idea of creating a second queue (with queue-
specific templates) for each class. What I ended up doing this
morning is customizing the global Autoreply template so that it
detects to see if the ticket was created using the UI, and send a
different sort of message to the student.

But I don’t like how I implemented this. I ended up having to
essentially wrap my template in a big if statement, and do one thing
if the original message contained received headers, and something else
if not (got this from OnWebCorrespond in Wiki). This is messy, and
will be VERY error prone when editing the text. Is there an easy way
to simply chose a different template based on some condition for the
autoreply? I’d basically just like to choose one template or another
based on a simple test.

Including the template (as in the ForkTemplate contribution on the
Wiki) didn’t work, since I had variables to evaluate in each template,
and doing it as ForkTemplate suggests ends up just pasting the perl
code in the sub-templates, rather than evaluating them. Maybe wrap
the template I loaded in an eval statement or something? I am a perl
newbie, so I’m at a bit of a loss.

Including the template (as in the ForkTemplate contribution on the
Wiki) didn’t work, since I had variables to evaluate in each template,
and doing it as ForkTemplate suggests ends up just pasting the perl
code in the sub-templates, rather than evaluating them. Maybe wrap
the template I loaded in an eval statement or something? I am a perl
newbie, so I’m at a bit of a loss.

Calling _ParseContent on your $obj instead of fetching the Content should work?

Cambridge Energy Alliance: Save money. Save the planet.

Including the template (as in the ForkTemplate contribution on the
Wiki) didn’t work, since I had variables to evaluate in each template,
and doing it as ForkTemplate suggests ends up just pasting the perl
code in the sub-templates, rather than evaluating them. Maybe wrap
the template I loaded in an eval statement or something? I am a perl
newbie, so I’m at a bit of a loss.

Calling _ParseContent on your $obj instead of fetching the Content should work?

And if that doesn’t work (if it does, the wiki should be updated),
you might heed the last sentence of ForkTemplate:

The … effect could also be achieved through the clever use of
$self->SetTemplate in CustomCondition.

i.e; do your switching to pick a template in a scrip.
You don’t to save on repeated content amongst templates that way though.
Untested example:

my $trans = $self->TransactionObj;
return 0 unless $trans->Type eq “Create”;
$self->SetTemplate( $condition ? ‘foo’ : ‘bar’ );

Cambridge Energy Alliance: Save money. Save the planet.

Including the template (as in the ForkTemplate contribution on the
Wiki) didn’t work, since I had variables to evaluate in each template,
and doing it as ForkTemplate suggests ends up just pasting the perl
code in the sub-templates, rather than evaluating them. Maybe wrap
the template I loaded in an eval statement or something? I am a perl
newbie, so I’m at a bit of a loss.

Okay, ForkTemplate has been updated with tested code that will handle
inclusion of full-templates without twiddling any of RT’s private bits.
Cambridge Energy Alliance: Save money. Save the planet.