[rt2zammad] update range and except duplicated ticket
This commit is contained in:
parent
e3c375a29e
commit
06b42d042b
2 changed files with 11 additions and 2 deletions
|
|
@ -59,11 +59,13 @@ def get_zammad_session(impersonated_user=None):
|
|||
def remove_duplicates_for(rt_id, zammad, retries=0):
|
||||
try:
|
||||
matching_zammad_tickets= zammad.ticket.search(f"title: \"\[RT-{rt_id}\]*\"")
|
||||
#matching_zammad_tickets= zammad.ticket.search('number:16014')
|
||||
print(matching_zammad_tickets[0])
|
||||
matching_zammad_ids = []
|
||||
if len(matching_zammad_tickets) >= 2:
|
||||
print(f"Found duplicates:")
|
||||
for zt in matching_zammad_tickets:
|
||||
print(f"{zt["id"]} {zt["title"]}")
|
||||
#print(f"{zt["rt_id"]} {zt["title"]}")
|
||||
matching_zammad_ids.append(zt["id"])
|
||||
|
||||
if len(matching_zammad_ids) >= 2:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue