1
0
Fork 0
forked from fnux/rt2zammad

Avoid using chown for agents

Otherwise the private comments will not work for them.
This commit is contained in:
Michal Čihař 2020-08-18 13:22:38 +02:00
parent 056b5009ac
commit 160e7bfa71

View file

@ -196,7 +196,9 @@ for ticket in tickets:
"note": "RT-import:{}".format(ticket["ticket"]["original_id"]),
"article": {
"subject": ticket["ticket"]["Subject"],
"body": "RT ticket merged into {}".format(ticket["ticket"]["numerical_id"]),
"body": "RT ticket merged into {}".format(
ticket["ticket"]["numerical_id"]
),
},
}
)
@ -238,7 +240,9 @@ for ticket in tickets:
}
)
creator_id = get_user(users[item["Creator"]], "id")
chown = creator_id != new["customer_id"]
chown = creator_id != new["customer_id"] and "Agent" not in get_user(
users[item["Creator"]], "roles"
)
if chown:
target.ticket.update(new["id"], {"customer_id": creator_id})
TicketArticle(get_zammad(get_user(users[item["Creator"]]))).create(