summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerghei Mihai <smihai@entrouvert.com>2016-06-10 13:59:20 (GMT)
committerSerghei Mihai <smihai@entrouvert.com>2016-06-10 14:03:25 (GMT)
commit541f6c65d0a3cdbf0ba89a428c1566e6819fd72e (patch)
tree11555c98ab7b1f4a129507646e8ce922263d78ea
parent4903411ef0a71d99522542bf693913f4136f1e97 (diff)
downloadmail2redmine-541f6c65d0a3cdbf0ba89a428c1566e6819fd72e.zip
mail2redmine-541f6c65d0a3cdbf0ba89a428c1566e6819fd72e.tar.gz
mail2redmine-541f6c65d0a3cdbf0ba89a428c1566e6819fd72e.tar.bz2
assign issue to user when created (#11296)v0.3
-rw-r--r--mail2redmine.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/mail2redmine.py b/mail2redmine.py
index 12db37c..410402b 100644
--- a/mail2redmine.py
+++ b/mail2redmine.py
@@ -92,14 +92,15 @@ def create_ticket(mail):
except redmine.resources.ResourceAttrError:
continue
- issue = r.issue.create(project_id=PROJECT_ID,
- subject=parse_header(mail['Subject']),
- tracker_id=TRACKER_ID,
- description=body,
- uploads=attachments)
+ issue_data = {'project_id': PROJECT_ID,
+ 'subject': parse_header(mail['Subject']),
+ 'tracker_id': TRACKER_ID,
+ 'description': body,
+ 'uploads': attachments}
if tech_manager:
- issue.assigned_to_id = tech_manager.id
- issue.save()
+ issue['assigned_to_id'] = tech_manager.id
+
+ issue = r.issue.create(**issue_data)
message = u"""[ Ce courriel est envoyé par un automate. Merci de ne pas y répondre, votre message ne serait pas pris en compte. ]