fix(event)!: Move "Cancelled" to status instead of event_type (#21471)
This commit is contained in:
parent
e8a57c63ce
commit
3229e2869c
3 changed files with 16 additions and 3 deletions
|
|
@ -75,7 +75,7 @@
|
|||
"label": "Event Type",
|
||||
"oldfieldname": "event_type",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Private\nPublic\nCancelled",
|
||||
"options": "Private\nPublic",
|
||||
"reqd": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
|
|
@ -223,7 +223,7 @@
|
|||
"in_list_view": 1,
|
||||
"in_standard_filter": 1,
|
||||
"label": "Status",
|
||||
"options": "Open\nCompleted\nClosed"
|
||||
"options": "Open\nCompleted\nClosed\nCancelled"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
|
|
@ -295,7 +295,7 @@
|
|||
"icon": "fa fa-calendar",
|
||||
"idx": 1,
|
||||
"links": [],
|
||||
"modified": "2022-08-12 19:24:34.794098",
|
||||
"modified": "2023-06-23 10:33:15.685368",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Desk",
|
||||
"name": "Event",
|
||||
|
|
|
|||
|
|
@ -226,3 +226,4 @@ frappe.desk.doctype.form_tour.patches.introduce_ui_tours
|
|||
execute:frappe.delete_doc_if_exists("Workspace", "Customization")
|
||||
execute:frappe.db.set_single_value("Document Naming Settings", "default_amend_naming", "Amend Counter")
|
||||
execute:frappe.delete_doc_if_exists("DocType", "Error Snapshot")
|
||||
frappe.patches.v15_0.move_event_cancelled_to_status
|
||||
|
|
|
|||
12
frappe/patches/v15_0/move_event_cancelled_to_status.py
Normal file
12
frappe/patches/v15_0/move_event_cancelled_to_status.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
Event = frappe.qb.DocType("Event")
|
||||
query = (
|
||||
frappe.qb.update(Event)
|
||||
.set(Event.event_type, "Private")
|
||||
.set(Event.status, "Cancelled")
|
||||
.where(Event.event_type == "Cancelled")
|
||||
)
|
||||
query.run()
|
||||
Loading…
Add table
Reference in a new issue