Issue #128: If queue name has a dash in it, email imported failed. Thanks

to enix.org for the patch.
This commit is contained in:
Ross Poulton 2010-01-20 07:59:47 +00:00
parent f990da3a56
commit f3d0bed5a6
2 changed files with 5 additions and 3 deletions

View File

@ -37,3 +37,5 @@ Andreas Kotowicz.
2010-01-20 r149 Issue #126 Reports didn't work with transalations.
2010-01-20 r150 Issue #127 Add german transalation, courtesy of openinformation.org
2009-01-20 r151 Issue #128 If queue name has a dash in it, email imported failed. Thanks to enix.org for the patch.

View File

@ -164,10 +164,10 @@ def ticket_from_message(message, queue, quiet):
return False
return True
regex = re.compile("^\[[A-Za-z0-9]+-\d+\]")
if regex.match(subject):
matchobj = re.match(r"^\[(?P<queue>[-A-Za-z0-9]+)-(?P<id>\d+)\]", subject)
if matchobj:
# This is a reply or forward.
ticket = re.match(r"^\[(?P<queue>[A-Za-z0-9]+)-(?P<id>\d+)\]", subject).group('id')
ticket = matchobj.group('id')
else:
ticket = None