Changing email subject to automatically update a ticket

Hello,

I’m going to receive emails with this subject “FOO BAR Changeset : 1234 FOO”.

I want to include this message into ticket #1234 if it exists, or
create a new ticket if it doesn’t (discarding this number).

I think the easiest way to do this, is changing the email subject
with a string at the beginning like [MY RT - #1234] so it will be
automatically processed by RT as a comment (or correspondance) of the
existing #1234 ticket.

How can I rename the subject of the email before a ticket gets created ?

  • before rt-mailgate ?
  • in rt-mailgate ?
  • in a scrip ?

I would prefer a scrip because everything will be stored in the DB
and I don’t need a script in the file system

If I do this in a scrip, I don’t have to use “onCreate” condition, but
probably “User defined” because I want to do this before the creation
of a ticket. But how can I get the object subject in the scrip as no
ticket has been created yet ?

Thanks !
L.B.

Hello,

I’m going to receive emails with this subject “FOO BAR Changeset : 1234 FOO”.

I want to include this message into ticket #1234 if it exists, or
create a new ticket if it doesn’t (discarding this number, taking the
next free).

I think the easiest way to do this, is changing the email subject
with a string at the beginning like [MY RT - #1234] so it will be
automatically processed by RT as a comment (or correspondance) of the
existing #1234 ticket if it exists, or not rename it if the ticket
doesn’t exist (and thus the ticket will be normally created).

How can I rename the subject of the email before a ticket gets created ?

  • before rt-mailgate ?
  • in rt-mailgate ?
  • in a scrip ?

I would prefer a scrip because everything will be stored in the DB
and I don’t need a script in the file system

If I do this in a scrip, I don’t have to use “onCreate” condition, but
probably “User defined” because I want to do this before the creation
of a ticket. But how can I get the object subject in the scrip as no
ticket has been created yet ?

Any other idea is welcome !

Thanks !
L.B.

I think you’re going to be best off doing some sort of pre-processing
on the incoming e-mail. You might be able to do this in rt-mailgate
but I don’t know how myself. I don’t think you’ll have any luck in a
scrip because by that point it’s in its own ticket.