Skip to content

Commit

Permalink
fix(patch): add fallback ticket type
Browse files Browse the repository at this point in the history
  • Loading branch information
ssiyad committed Jul 14, 2023
1 parent 3569025 commit 96bd744
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@


def execute():
add_fallback()
set_ticket_type()


def add_fallback():
if frappe.db.exists("HD Ticket Type", FALLBACK_TICKET_TYPE):
return
d = frappe.new_doc("HD Ticket Type")
d.is_system = True
d.name = FALLBACK_TICKET_TYPE
d.save()


def set_ticket_type():
QBTicket = frappe.qb.DocType("HD Ticket")
(
frappe.qb.update(QBTicket)
Expand Down
2 changes: 1 addition & 1 deletion helpdesk/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ helpdesk.patches.naming_autoincrement
execute:frappe.delete_doc("Workspace", "Frappe Desk", force=True)
helpdesk.patches.add_priority_integer
helpdesk.patches.template_remove_default_fields
helpdesk.helpdesk.doctype.hd_ticket.patches.set_ticket_type
helpdesk.helpdesk.doctype.hd_ticket.patches.fallback_ticket_type

0 comments on commit 96bd744

Please sign in to comment.