PostMaster filter to process a TicketTime Value

Hi, We'd like to be able to have our customers specify a deadline for some e-mail requests. We use TicketFreeTime2 field for that. Is it possible to process an e-mail with a filter so that if a customer sends an e-mail that contains something like: Deadline: 2011-09-09 10:12:00, it sets the X-OTRS-TicketTime2 to 2011-09-09 10:12:00? Thanks, Ugo

You should be careful about that because getting your users to type a valid
fully and properly formatted timestamp might be difficult.
But assuming that, use a Postmaster Filter
Filter Body: Deadline: (\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})
Set X-OTRS-TicketTime2: [***]
(see the gray box on the left of PostMasterFilter).
On Wed, Aug 10, 2011 at 11:13 AM, Ugo Bellavance
Hi,
We'd like to be able to have our customers specify a deadline for some e-mail requests. We use TicketFreeTime2 field for that. Is it possible to process an e-mail with a filter so that if a customer sends an e-mail that contains something like:
Deadline: 2011-09-09 10:12:00, it sets the X-OTRS-TicketTime2 to 2011-09-09 10:12:00?
Thanks,
Ugo
------------------------------**------------------------------**--------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/**pipermail/otrshttp://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/**listinfo/otrshttp://lists.otrs.org/cgi-bin/listinfo/otrs

Le 2011-08-10 18:53, Gerald Young a écrit :
You should be careful about that because getting your users to type a valid fully and properly formatted timestamp might be difficult.
Understood.
But assuming that, use a Postmaster Filter Filter Body: Deadline: (\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) Set X-OTRS-TicketTime2: [***]
(see the gray box on the left of PostMasterFilter).
Yeah, it is all there in the grey box... but I wouldn't have found the regex without your help. Of course, in my case, I don't really care about the time, I only care about the date. Could I do Filter Body: Deadline: (\d{4}-\d{2}-\d{2} Set X-OTRS-TicketTime2: [***] 23:59:59 ?

yes, but close your parentheses :)
On Thu, Aug 11, 2011 at 9:22 AM, Ugo Bellavance
Le 2011-08-10 18:53, Gerald Young a écrit :
You should be careful about that because getting your users to type a
valid fully and properly formatted timestamp might be difficult.
Understood.
But assuming that, use a Postmaster Filter
Filter Body: Deadline: (\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) Set X-OTRS-TicketTime2: [***]
(see the gray box on the left of PostMasterFilter).
Yeah, it is all there in the grey box... but I wouldn't have found the regex without your help.
Of course, in my case, I don't really care about the time, I only care about the date.
Could I do
Filter Body: Deadline: (\d{4}-\d{2}-\d{2} Set X-OTRS-TicketTime2: [***] 23:59:59
?
------------------------------**------------------------------**--------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/**pipermail/otrshttp://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/**listinfo/otrshttp://lists.otrs.org/cgi-bin/listinfo/otrs
participants (2)
-
Gerald Young
-
Ugo Bellavance