|
@@ -49,21 +49,22 @@ def send_wontfix_notification(user, ticket):
|
|
|
def process_in_progress_ticket(ticket, start_time):
|
|
|
tickets_new=jsreq.requestGetTicket_user(token, config.API_URL+f"tickets/api/ticket_list/{ticket.id}")
|
|
|
for ticket_new in tickets_new:
|
|
|
- if ticket_new.id in tickets:
|
|
|
- tickets[ticket_new.id] = {
|
|
|
- "reminders": 0,
|
|
|
- "last_date_reminder": start_time
|
|
|
- }
|
|
|
-
|
|
|
- if IS_INFINITE_REMINDER or tickets[ticket_new.id]['reminders'] < MAX_REMINDERS:
|
|
|
- if (start_time - tickets[ticket_new.id]["last_date_reminder"]) > DEFAULT_REMINDER_INTERVAL:
|
|
|
- send_reminder("st_request_in_process@ej.sharix-app.org", ticket_new)
|
|
|
-
|
|
|
- tickets[ticket_new.id]["reminders"] += 1
|
|
|
- tickets[ticket_new.id]["last_date_reminder"] += start_time
|
|
|
- elif not IS_INFINITE_REMINDER and tickets[ticket_new.id]['reminders'] >= MAX_REMINDERS:
|
|
|
- del tickets[ticket_new.id]
|
|
|
- # Функция смены статуса на WONTFIX
|
|
|
+ if ticket_new.status == 131:
|
|
|
+ if ticket_new.id in tickets:
|
|
|
+ tickets[ticket_new.id] = {
|
|
|
+ "reminders": 0,
|
|
|
+ "last_date_reminder": start_time
|
|
|
+ }
|
|
|
+
|
|
|
+ if IS_INFINITE_REMINDER or tickets[ticket_new.id]['reminders'] < MAX_REMINDERS:
|
|
|
+ if (start_time - tickets[ticket_new.id]["last_date_reminder"]) > DEFAULT_REMINDER_INTERVAL:
|
|
|
+ send_reminder("st_request_in_process@ej.sharix-app.org", ticket_new)
|
|
|
+
|
|
|
+ tickets[ticket_new.id]["reminders"] += 1
|
|
|
+ tickets[ticket_new.id]["last_date_reminder"] += start_time
|
|
|
+ elif not IS_INFINITE_REMINDER and tickets[ticket_new.id]['reminders'] >= MAX_REMINDERS:
|
|
|
+ del tickets[ticket_new.id]
|
|
|
+ # Функция смены статуса на WONTFIX
|
|
|
|
|
|
|
|
|
def status_changer():
|