subject change opens new ticket

hi all just a quick question i've setup OTRS months ago and all is working well except for one slightly annoying issue as part of our support process, we are now asked to open a case with our upstream provider in there own support portal. when doing so, our OTRS support email address is emailed with a "case opened" and then a "new case comment" email during interaction with the case. does anyone know how I can get OTRS to merge all case tickets with the same case number in the subject ?? regardless of whether the case email includes additional text ? This is done by default for any email to and from OTRS but our upstream providers case tickets are making a little difficult as we need to manually merge the tickets Hope this made sense.

Generally I would avoid emailing other ticketing systems from OTRS, you can
get into a very nasty "Thank you for your reply" email loop if
auto-responses are enabled.
But you might want to enable PostmasterFollowUpSearchInReferences in Ticket
-> Core::PostMaster - this will search the reference headers to see if it
can match the email with an existing ticket.
Steve
On 23 May 2012 03:19, ipguy
hi all
just a quick question
i've setup OTRS months ago and all is working well except for one slightly annoying issue
as part of our support process, we are now asked to open a case with our upstream provider in there own support portal.
when doing so, our OTRS support email address is emailed with a "case opened" and then a "new case comment" email during interaction with the case.
does anyone know how I can get OTRS to merge all case tickets with the same case number in the subject ?? regardless of whether the case email includes additional text ?
This is done by default for any email to and from OTRS but our upstream providers case tickets are making a little difficult as we need to manually merge the tickets
Hope this made sense.
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Thanks, unfortunately it's already set.
To clarify, we're not emailing another helpdesk system from OTRS, the
emails are generated by the other helpdesk system due to our staff opening
a case with our upstream provider.
Notification emails are then sent to our OTRS with there ticket number in
the subject.
Can we filter against there ticket number to merge tickets ? instead of
each new correspondance opening a new ticket in our OTRS
---------- Forwarded message ----------
From: Steven Carr
hi all
just a quick question
i've setup OTRS months ago and all is working well except for one slightly annoying issue
as part of our support process, we are now asked to open a case with our upstream provider in there own support portal.
when doing so, our OTRS support email address is emailed with a "case opened" and then a "new case comment" email during interaction with the case.
does anyone know how I can get OTRS to merge all case tickets with the same case number in the subject ?? regardless of whether the case email includes additional text ?
This is done by default for any email to and from OTRS but our upstream providers case tickets are making a little difficult as we need to manually merge the tickets
Hope this made sense.
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

I think the short answer is no, their emails have nothing in them that OTRS
can use to identify the ticket within OTRS to attach the case to.
One thing you might be able to do is look at the GenericAgent scripts, you
might be able to write a custom script that runs every 10 mins that locates
any new tickets from the external helpdesk and tries to see if it can match
them with an existing ticket, but that would be quite a complex thing to do
and I'm not sure if it would even be possible.
Steve
On 24 May 2012 00:24, ipguy
Thanks, unfortunately it's already set.
To clarify, we're not emailing another helpdesk system from OTRS, the emails are generated by the other helpdesk system due to our staff opening a case with our upstream provider.
Notification emails are then sent to our OTRS with there ticket number in the subject.
Can we filter against there ticket number to merge tickets ? instead of each new correspondance opening a new ticket in our OTRS
---------- Forwarded message ---------- From: Steven Carr
Date: Wed, May 23, 2012 at 5:45 PM Subject: Re: [otrs] subject change opens new ticket To: "User questions and discussions about OTRS." Generally I would avoid emailing other ticketing systems from OTRS, you can get into a very nasty "Thank you for your reply" email loop if auto-responses are enabled.
But you might want to enable PostmasterFollowUpSearchInReferences in Ticket -> Core::PostMaster - this will search the reference headers to see if it can match the email with an existing ticket.
Steve
On 23 May 2012 03:19, ipguy
wrote: hi all
just a quick question
i've setup OTRS months ago and all is working well except for one slightly annoying issue
as part of our support process, we are now asked to open a case with our upstream provider in there own support portal.
when doing so, our OTRS support email address is emailed with a "case opened" and then a "new case comment" email during interaction with the case.
does anyone know how I can get OTRS to merge all case tickets with the same case number in the subject ?? regardless of whether the case email includes additional text ?
This is done by default for any email to and from OTRS but our upstream providers case tickets are making a little difficult as we need to manually merge the tickets
Hope this made sense.
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

i would have thought that the creation of a filter, with regex, applied to
the subject of am email would be straight forward, i guess not.
your right in saying that the emails have nothing to do with OTRS, other
than the fact that the first email opened a ticket, with a case number in
it's subject.
I would have thought I could, as above, find a way of identifying the case
number in the subject and then merging tickets with the same case numbers?
On Thu, May 24, 2012 at 3:02 PM, Steven Carr
I think the short answer is no, their emails have nothing in them that OTRS can use to identify the ticket within OTRS to attach the case to.
One thing you might be able to do is look at the GenericAgent scripts, you might be able to write a custom script that runs every 10 mins that locates any new tickets from the external helpdesk and tries to see if it can match them with an existing ticket, but that would be quite a complex thing to do and I'm not sure if it would even be possible.
Steve
On 24 May 2012 00:24, ipguy
wrote: Thanks, unfortunately it's already set.
To clarify, we're not emailing another helpdesk system from OTRS, the emails are generated by the other helpdesk system due to our staff opening a case with our upstream provider.
Notification emails are then sent to our OTRS with there ticket number in the subject.
Can we filter against there ticket number to merge tickets ? instead of each new correspondance opening a new ticket in our OTRS
---------- Forwarded message ---------- From: Steven Carr
Date: Wed, May 23, 2012 at 5:45 PM Subject: Re: [otrs] subject change opens new ticket To: "User questions and discussions about OTRS." Generally I would avoid emailing other ticketing systems from OTRS, you can get into a very nasty "Thank you for your reply" email loop if auto-responses are enabled.
But you might want to enable PostmasterFollowUpSearchInReferences in Ticket -> Core::PostMaster - this will search the reference headers to see if it can match the email with an existing ticket.
Steve
On 23 May 2012 03:19, ipguy
wrote: hi all
just a quick question
i've setup OTRS months ago and all is working well except for one slightly annoying issue
as part of our support process, we are now asked to open a case with our upstream provider in there own support portal.
when doing so, our OTRS support email address is emailed with a "case opened" and then a "new case comment" email during interaction with the case.
does anyone know how I can get OTRS to merge all case tickets with the same case number in the subject ?? regardless of whether the case email includes additional text ?
This is done by default for any email to and from OTRS but our upstream providers case tickets are making a little difficult as we need to manually merge the tickets
Hope this made sense.
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Hi, this is *exactly* what I just implemented for a customer of mine this week. I did not find any way to implement the functionality with out-of-the-box OTRS functions, so I wrote a PostMaster module that does, essentially, the following: 1. Parse incoming mails from the 'upstream' ticket management system to find out the external ticket ID 2. If there is already an OTRS ticket with the same external ticket ID, mark the new mail as a followup to it by changing the subject (must include the OTRS ticket ID) 3. If there isn't, store the ticket ID in a dynamic field in OTRS for the ticket There is some additional magic that replicates external ticket state and priority in OTRS, but essentially that's all there is to it. You'll need some experience in Perl, and some digging around in the OTRS developer API to make it work, but it's definitely not rocket science. Note that the dynamic field stuff reqires at least OTRS 3.1, with 3.0 and below you would need to use a TicketFreeText field for that purpose. Best regards, Peter. On 24.05.2012, at 01:24, ipguy wrote:
Thanks, unfortunately it's already set.
To clarify, we're not emailing another helpdesk system from OTRS, the emails are generated by the other helpdesk system due to our staff opening a case with our upstream provider.
Notification emails are then sent to our OTRS with there ticket number in the subject.
Can we filter against there ticket number to merge tickets ? instead of each new correspondance opening a new ticket in our OTRS
---------- Forwarded message ---------- From: Steven Carr
Date: Wed, May 23, 2012 at 5:45 PM Subject: Re: [otrs] subject change opens new ticket To: "User questions and discussions about OTRS." Generally I would avoid emailing other ticketing systems from OTRS, you can get into a very nasty "Thank you for your reply" email loop if auto-responses are enabled.
But you might want to enable PostmasterFollowUpSearchInReferences in Ticket -> Core::PostMaster - this will search the reference headers to see if it can match the email with an existing ticket.
Steve
On 23 May 2012 03:19, ipguy
wrote: hi all
just a quick question
i've setup OTRS months ago and all is working well except for one slightly annoying issue
as part of our support process, we are now asked to open a case with our upstream provider in there own support portal.
when doing so, our OTRS support email address is emailed with a "case opened" and then a "new case comment" email during interaction with the case.
does anyone know how I can get OTRS to merge all case tickets with the same case number in the subject ?? regardless of whether the case email includes additional text ?
This is done by default for any email to and from OTRS but our upstream providers case tickets are making a little difficult as we need to manually merge the tickets
Hope this made sense.
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs --------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Hi Peter
Any chance you can supply the script ?
and a quick and dirty howto.
would be greatly appreciated !
On Thu, May 24, 2012 at 4:47 PM, Peter Eckel
Hi,
this is *exactly* what I just implemented for a customer of mine this week.
I did not find any way to implement the functionality with out-of-the-box OTRS functions, so I wrote a PostMaster module that does, essentially, the following:
1. Parse incoming mails from the 'upstream' ticket management system to find out the external ticket ID 2. If there is already an OTRS ticket with the same external ticket ID, mark the new mail as a followup to it by changing the subject (must include the OTRS ticket ID) 3. If there isn't, store the ticket ID in a dynamic field in OTRS for the ticket
There is some additional magic that replicates external ticket state and priority in OTRS, but essentially that's all there is to it. You'll need some experience in Perl, and some digging around in the OTRS developer API to make it work, but it's definitely not rocket science. Note that the dynamic field stuff reqires at least OTRS 3.1, with 3.0 and below you would need to use a TicketFreeText field for that purpose.
Best regards,
Peter.
On 24.05.2012, at 01:24, ipguy wrote:
Thanks, unfortunately it's already set.
To clarify, we're not emailing another helpdesk system from OTRS, the emails are generated by the other helpdesk system due to our staff opening a case with our upstream provider.
Notification emails are then sent to our OTRS with there ticket number in the subject.
Can we filter against there ticket number to merge tickets ? instead of each new correspondance opening a new ticket in our OTRS
---------- Forwarded message ---------- From: Steven Carr
Date: Wed, May 23, 2012 at 5:45 PM Subject: Re: [otrs] subject change opens new ticket To: "User questions and discussions about OTRS." Generally I would avoid emailing other ticketing systems from OTRS, you can get into a very nasty "Thank you for your reply" email loop if auto-responses are enabled.
But you might want to enable PostmasterFollowUpSearchInReferences in Ticket -> Core::PostMaster - this will search the reference headers to see if it can match the email with an existing ticket.
Steve
On 23 May 2012 03:19, ipguy
wrote: hi all
just a quick question
i've setup OTRS months ago and all is working well except for one slightly annoying issue
as part of our support process, we are now asked to open a case with our upstream provider in there own support portal.
when doing so, our OTRS support email address is emailed with a "case opened" and then a "new case comment" email during interaction with the case.
does anyone know how I can get OTRS to merge all case tickets with the same case number in the subject ?? regardless of whether the case email includes additional text ?
This is done by default for any email to and from OTRS but our upstream providers case tickets are making a little difficult as we need to manually merge the tickets
Hope this made sense.
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs --------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Any chance you can supply the script ?
unfortunately no - it was done for a customer, so I can't give it away.
and a quick and dirty howto.
I wouldn't do it 'quick and dirty', but rather by the book ... 1. Create the DynamicField using the GUI. I built an OPM installer that takes care of it, but you will only need one DynamicField, so you can as well do it by hand. Call it 'ExternalTicketNumber', for instance. 2. Implement the PostMasterFilter module (located in $OTRS_HOME/Kernel/System/PostMaster/Filters). The module must have a new() method and a Run() method. The latter does the real job. There are already some existing filters in that directory, so it's easy to copy one of them any modify it. If I understood you correctly, you can use the 'Subject' field of the mail (which is accessible via the GetConfig object) and parse it for the ticket number, so there is no need in parsing the entire mail. Then you do a TicketSearch for the DynamicField 'ExternalTicketNumber' and value of that external number you found, and if you find one, modify the new mail's subject by prepending the ticket number of the OTRS ticket you found in square brackets (unless you modfied the ticket format in OTRS, which might be the case). The PostMaster will then notice it's a followup and append it as an article to the existing ticket. If you don't find a ticket that has the external ticket number in the 'ExternalTicketNumber' dynamic field, add a new GetConfig property using 'X-OTRS-DynamicField-ExternalTicketNumber' as its name and the number as its property. This will add a new header to the mail, which OTRS uses to set the dynamic field in the process. 3. Tell OTRS to use your module by providing an XML configuration file that sets 'PostMaster::PreFilterModule###100-YourTicketModule' to point at your module (see $OTRS_HOME/Kernel/Config/File/Ticket.xml for an example how to do this). You *must* provide that file to tell OTRS to call your module before PostMaster processes the external mail and creates the ticket for you, otherwise it will just sit there doing nothing. Essentially, that's it. If you need to set the status and priority of the external tickets, there is some more parsing to do, and you'll also have to set the 'X-OTRS-State' and 'X-OTRS-Priority' properties in the process, but that's really not a big deal. I'd add some configuration options as well (for example my tool has a confgurable mapping from external ticket system states to OTRS states and the same for priorities), but that may not be necessary for you.
would be greatly appreciated !
I hope this helps a bit. If you are comfortable with Perl, you should get along. Cheers, Peter.
participants (3)
-
ipguy
-
Peter Eckel
-
Steven Carr