Skip to content

Commit

Permalink
Merge pull request frappe#1529 from ssiyad/patch/ticket/replace_overd…
Browse files Browse the repository at this point in the history
…ue_with_failed

patch: ticket: replace `Overdue` with `Failed` (Agreement status)
  • Loading branch information
ssiyad authored Aug 23, 2023
2 parents 4b6c53c + 05fcfca commit 140952e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion desk/src/pages/desk/ticket-list/TicketList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const columns = [
width: "w-36",
},
{
label: "Agreement Status",
label: "Agreement status",
key: "agreement_status",
width: "w-36",
},
Expand Down
3 changes: 0 additions & 3 deletions helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import json
from datetime import timedelta
from email.utils import parseaddr
from functools import lru_cache
from typing import List

import frappe
from frappe import _
from frappe.core.utils import get_parent_doc
from frappe.desk.form.assign_to import add as assign
from frappe.desk.form.assign_to import clear as clear_all_assignments
from frappe.model.document import Document
from frappe.query_builder import Case, DocType, Order
from frappe.utils import date_diff, get_datetime, now_datetime, time_diff_in_seconds
from pypika.functions import Count
from pypika.queries import Query
from pypika.terms import Criterion
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import frappe


def execute():
QBTicket = frappe.qb.DocType("HD Ticket")
frappe.qb.update(QBTicket).set(QBTicket.agreement_status, "Failed").where(
QBTicket.agreement_status == "Overdue"
).run()
1 change: 1 addition & 0 deletions helpdesk/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ execute:frappe.delete_doc("Server Script", "Ticket Auto Set Custom Fields", igno
helpdesk.helpdesk.doctype.hd_ticket_feedback_option.patches.ootb
helpdesk.helpdesk.doctype.hd_ticket_feedback_option.patches.label_as_name
helpdesk.helpdesk.doctype.hd_service_level_agreement.patches.missing_sla_creation
helpdesk.helpdesk.doctype.hd_ticket.patches.replace_overdue_failed

0 comments on commit 140952e

Please sign in to comment.