set state to 'open' when receiving reply on a ticket that is not in state 'new'
This commit is contained in:
parent
734af10525
commit
9aeb6a319f
2 changed files with 58 additions and 0 deletions
|
@ -180,12 +180,18 @@ def receive_email(envelope, log=None):
|
|||
|
||||
reply = None
|
||||
if new:
|
||||
# auto reply if new issue
|
||||
references = collect_references(active_issue_thread)
|
||||
|
||||
reply_email = Email.objects.create(
|
||||
sender=recipient, recipient=sender, body="Thank you for your message.", subject="Message received",
|
||||
in_reply_to=header_message_id, event=target_event, issue_thread=active_issue_thread)
|
||||
reply = make_reply(reply_email, references)
|
||||
else:
|
||||
#change state if not new
|
||||
if active_issue_thread.state != 'pending_new':
|
||||
active_issue_thread.state = 'pending_open'
|
||||
active_issue_thread.save()
|
||||
|
||||
return email, new, reply
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue