Simplify ticket subject

This commit is contained in:
Michal Čihař 2020-12-30 13:42:48 +01:00
parent b3383c542a
commit d32e9859f7

View file

@ -195,10 +195,11 @@ def get_user(userdata, attr="login", default=None):
for ticket in tickets: for ticket in tickets:
label = "RT-{}".format(ticket["ticket"]["original_id"]) label = "RT-{}".format(ticket["ticket"]["original_id"])
creator = get_user(users[ticket["ticket"]["Creator"]]) creator = get_user(users[ticket["ticket"]["Creator"]])
print(f"Importing {label} ({creator})") print(f"Importing {label} ({creator})")
create_args = { create_args = {
"title": "{} [{}]".format(ticket["ticket"]["Subject"], label), "title": ticket["ticket"]["Subject"],
"group": "Users", "group": "Users",
"customer": creator, "customer": creator,
"note": "RT-import:{}".format(ticket["ticket"]["original_id"]), "note": "RT-import:{}".format(ticket["ticket"]["original_id"]),