From 306d8bf4d30944b8553024bf2b035a2b90688fd1 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 27 Feb 2013 16:14:16 +0100 Subject: [PATCH] Changed regex for email subjects to use queue slug to tell internal ticket id from external ones. --- helpdesk/management/commands/get_email.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpdesk/management/commands/get_email.py b/helpdesk/management/commands/get_email.py index 373d76aa..e3893711 100644 --- a/helpdesk/management/commands/get_email.py +++ b/helpdesk/management/commands/get_email.py @@ -172,7 +172,7 @@ def ticket_from_message(message, queue, quiet): return False return True - matchobj = re.match(r"^\[(?P[-A-Za-z0-9]+)-(?P\d+)\]", subject) + matchobj = re.match(r".*\["+queue.slug+"-(?P\d+)\]", subject) if matchobj: # This is a reply or forward. ticket = matchobj.group('id')