From e6b5b44dc1ee33356b8976f76d3631c4247c707c Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Tue, 28 Oct 2025 16:21:37 +0530 Subject: [PATCH 1/2] refactor: rename to Buzz Event, Buzz Settings --- README.md | 6 ++-- buzz/api.py | 28 +++++++++--------- .../apply_for_sponsorship.json | 2 +- .../propose_a_talk/propose_a_talk.json | 2 +- buzz/buzz/workspace/buzz/buzz.json | 12 ++++---- .../additional_event_page.json | 2 +- .../additional_event_page.py | 2 +- .../__init__.py | 0 .../fe_event.js => buzz_event/buzz_event.js} | 2 +- .../buzz_event.json} | 2 +- .../fe_event.py => buzz_event/buzz_event.py} | 2 +- .../test_buzz_event.py} | 0 .../{fe_event => buzz_settings}/__init__.py | 0 .../buzz_settings.js} | 2 +- .../buzz_settings.json} | 4 +-- .../buzz_settings.py} | 2 +- .../test_buzz_settings.py} | 4 +-- .../event_check_in/event_check_in.json | 2 +- .../event_feedback/event_feedback.json | 2 +- .../doctype/event_sponsor/event_sponsor.json | 4 +-- .../event_sponsor/test_event_sponsor.py | 2 +- .../doctype/event_track/event_track.json | 4 +-- .../sponsorship_tier/sponsorship_tier.json | 4 +-- .../report/event_overview/event_overview.js | 2 +- .../report/event_overview/event_overview.json | 2 +- .../report/event_overview/event_overview.py | 4 +-- buzz/install.py | 6 ++-- buzz/patches.txt | 3 +- buzz/patches/rename_doctypes_for_buzz.py | 29 +++++++++++++++++++ buzz/payments.py | 6 ++-- .../sponsorship_enquiry.json | 4 +-- .../doctype/talk_proposal/talk_proposal.json | 4 +-- .../doctype/talk_proposal/talk_proposal.py | 3 +- buzz/templates/emails/ticket.html | 2 +- .../bulk_ticket_coupon.json | 2 +- .../test_bulk_ticket_coupon.py | 2 +- .../doctype/event_booking/event_booking.json | 4 +-- .../doctype/event_booking/event_booking.py | 5 ++-- .../event_booking/test_event_booking.py | 10 +++---- .../doctype/event_ticket/event_ticket.json | 4 +-- .../doctype/event_ticket/event_ticket.py | 7 ++--- .../event_ticket_type/event_ticket_type.json | 4 +-- .../doctype/ticket_add_on/ticket_add_on.json | 2 +- .../ticket_email_notification.html | 2 +- .../ticket_email_notification.json | 4 +-- .../standard_ticket/standard_ticket.json | 2 +- dashboard/src/components/EventSelector.vue | 2 +- 47 files changed, 116 insertions(+), 89 deletions(-) rename buzz/events/doctype/{event_management_settings => buzz_event}/__init__.py (100%) rename buzz/events/doctype/{fe_event/fe_event.js => buzz_event/buzz_event.js} (95%) rename buzz/events/doctype/{fe_event/fe_event.json => buzz_event/buzz_event.json} (99%) rename buzz/events/doctype/{fe_event/fe_event.py => buzz_event/buzz_event.py} (98%) rename buzz/events/doctype/{fe_event/test_fe_event.py => buzz_event/test_buzz_event.py} (100%) rename buzz/events/doctype/{fe_event => buzz_settings}/__init__.py (100%) rename buzz/events/doctype/{event_management_settings/event_management_settings.js => buzz_settings/buzz_settings.js} (72%) rename buzz/events/doctype/{event_management_settings/event_management_settings.json => buzz_settings/buzz_settings.json} (98%) rename buzz/events/doctype/{event_management_settings/event_management_settings.py => buzz_settings/buzz_settings.py} (97%) rename buzz/events/doctype/{event_management_settings/test_event_management_settings.py => buzz_settings/test_buzz_settings.py} (81%) create mode 100644 buzz/patches/rename_doctypes_for_buzz.py diff --git a/README.md b/README.md index d4593767..68ca90f8 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ GitHub commit activity -![FE Event DocType](.github/images/fe-event-main-form.png) +![Buzz Event DocType](.github/images/fe-event-main-form.png) Open Source, Powerful, and Comprehensive Event Management Platform @@ -19,7 +19,7 @@ Open Source, Powerful, and Comprehensive Event Management Platform ### The Main Entity -The **FE Event** DocType/Form is the primary entity of the system. Once you have created an event, you can setup ticket types, sponsorship tiers, add-ons (like T-Shirts, Meals, etc.), schedule, and much more! +The **Buzz Event** DocType/Form is the primary entity of the system. Once you have created an event, you can setup ticket types, sponsorship tiers, add-ons (like T-Shirts, Meals, etc.), schedule, and much more! ### Features @@ -45,7 +45,7 @@ This app depends on Frappe's Payments app for online payments. You can select a #### Ticket Management -The benefits of having a "self-service" dashboard for attendees is that they can modify their bookings on their own (the deadlines can be configured from the **Event Management Settings**). For example, changing their T-Shirt Size after booking: +The benefits of having a "self-service" dashboard for attendees is that they can modify their bookings on their own (the deadlines can be configured from the **Buzz Settings**). For example, changing their T-Shirt Size after booking: ![Change Add-on Preference](.github/images/ticket-updates.png) diff --git a/buzz/api.py b/buzz/api.py index d1d13f0c..c1c9062c 100644 --- a/buzz/api.py +++ b/buzz/api.py @@ -9,10 +9,10 @@ def is_ticket_transfer_allowed(event_id: str | int) -> bool: """Check if ticket transfer is allowed based on event start date and settings.""" try: # Get event details - event = frappe.get_cached_doc("FE Event", event_id) + event = frappe.get_cached_doc("Buzz Event", event_id) # Get event management settings - settings = frappe.get_single("Event Management Settings") + settings = frappe.get_single("Buzz Settings") # Default to 7 days if no setting is found transfer_cutoff_days = settings.get("allow_transfer_ticket_before_event_start_days", 7) @@ -37,10 +37,10 @@ def is_add_on_change_allowed(event_id: str | int) -> bool: """Check if add-on changes are allowed based on event start date and settings.""" try: # Get event details - event = frappe.get_cached_doc("FE Event", event_id) + event = frappe.get_cached_doc("Buzz Event", event_id) # Get event management settings - settings = frappe.get_cached_doc("Event Management Settings") + settings = frappe.get_cached_doc("Buzz Settings") # Default to 7 days if no setting is found add_on_change_cutoff_days = settings.get("allow_add_ons_change_before_event_start_days", 7) @@ -77,10 +77,10 @@ def is_cancellation_request_allowed(event_id: str | int) -> bool: """Check if cancellation request is allowed based on event start date and settings.""" try: # Get event details - event = frappe.get_cached_doc("FE Event", event_id) + event = frappe.get_cached_doc("Buzz Event", event_id) # Get event management settings - settings = frappe.get_cached_doc("Event Management Settings") + settings = frappe.get_cached_doc("Buzz Settings") # Default to 7 days if no setting is found cancellation_cutoff_days = settings.get( @@ -112,7 +112,7 @@ def can_request_cancellation(event_id: str | int) -> dict: @frappe.whitelist() def get_event_booking_data(event_route: str) -> dict: data = frappe._dict() - event_doc = frappe.get_cached_doc("FE Event", {"route": event_route}) + event_doc = frappe.get_cached_doc("Buzz Event", {"route": event_route}) # Ticket Types available_ticket_types = [] @@ -137,7 +137,7 @@ def get_event_booking_data(event_route: str) -> dict: data.available_add_ons = add_ons # GST Settings - event_settings = frappe.get_cached_doc("Event Management Settings") + event_settings = frappe.get_cached_doc("Buzz Settings") data.gst_settings = { "apply_gst_on_bookings": event_settings.apply_gst_on_bookings, "gst_percentage": event_settings.gst_percentage or 18, @@ -223,7 +223,7 @@ def send_ticket_transfer_emails(ticket_id: str, old_name: str, old_email: str, n try: # Get ticket and event details ticket = frappe.get_doc("Event Ticket", ticket_id) - event = frappe.get_doc("FE Event", ticket.event) + event = frappe.get_doc("Buzz Event", ticket.event) booking = frappe.get_doc("Event Booking", ticket.booking) # Email to old attendee - notification of transfer @@ -347,7 +347,7 @@ def get_booking_details(booking_id: str) -> dict: ticket.add_ons = sorted(ticket.add_ons, key=lambda x: x["title"]) details.tickets = tickets - details.event = frappe.get_cached_doc("FE Event", booking_doc.event) + details.event = frappe.get_cached_doc("Buzz Event", booking_doc.event) details.can_transfer_ticket = can_transfer_ticket(details.event.name) details.can_change_add_ons = can_change_add_ons(details.event.name) details.can_request_cancellation = can_request_cancellation(details.event.name) @@ -430,7 +430,7 @@ def get_sponsorship_details(enquiry_id: str) -> dict: # Get event details event_details = {} if enquiry.event: - event = frappe.get_cached_doc("FE Event", enquiry.event) + event = frappe.get_cached_doc("Buzz Event", enquiry.event) event_details = { "title": event.title, "short_description": getattr(event, "short_description", ""), @@ -488,7 +488,7 @@ def get_user_sponsorship_inquiries() -> list: # Get event titles and tier titles for inquiry in inquiries: if inquiry.event: - event_title = frappe.db.get_value("FE Event", inquiry.event, "title") + event_title = frappe.db.get_value("Buzz Event", inquiry.event, "title") inquiry["event_title"] = event_title if inquiry.tier: @@ -600,7 +600,7 @@ def get_ticket_details(ticket_id: str) -> dict: enhanced_add_ons.append(add_on_data) details.add_ons = enhanced_add_ons - details.event = frappe.get_cached_doc("FE Event", ticket_doc.event) + details.event = frappe.get_cached_doc("Buzz Event", ticket_doc.event) # Only include booking information if the current user is the owner of the booking booking_doc = None @@ -691,7 +691,7 @@ def validate_ticket_for_checkin(ticket_id: str) -> dict: frappe.throw(_("Ticket not found")) ticket_doc = frappe.get_cached_doc("Event Ticket", ticket_id) - event_doc = frappe.get_cached_doc("FE Event", ticket_doc.event) + event_doc = frappe.get_cached_doc("Buzz Event", ticket_doc.event) ticket_type_doc = ( frappe.get_cached_doc("Event Ticket Type", ticket_doc.ticket_type) if ticket_doc.ticket_type else None ) diff --git a/buzz/buzz/web_form/apply_for_sponsorship/apply_for_sponsorship.json b/buzz/buzz/web_form/apply_for_sponsorship/apply_for_sponsorship.json index 378e2058..c828f756 100644 --- a/buzz/buzz/web_form/apply_for_sponsorship/apply_for_sponsorship.json +++ b/buzz/buzz/web_form/apply_for_sponsorship/apply_for_sponsorship.json @@ -45,7 +45,7 @@ "label": "Event", "max_length": 0, "max_value": 0, - "options": "FE Event", + "options": "Buzz Event", "precision": "", "read_only": 0, "reqd": 1, diff --git a/buzz/buzz/web_form/propose_a_talk/propose_a_talk.json b/buzz/buzz/web_form/propose_a_talk/propose_a_talk.json index 65ca6818..1936b690 100644 --- a/buzz/buzz/web_form/propose_a_talk/propose_a_talk.json +++ b/buzz/buzz/web_form/propose_a_talk/propose_a_talk.json @@ -71,7 +71,7 @@ "label": "Event", "max_length": 0, "max_value": 0, - "options": "FE Event", + "options": "Buzz Event", "precision": "", "read_only": 0, "reqd": 1, diff --git a/buzz/buzz/workspace/buzz/buzz.json b/buzz/buzz/workspace/buzz/buzz.json index 38b3ce84..6d59b8cc 100644 --- a/buzz/buzz/workspace/buzz/buzz.json +++ b/buzz/buzz/workspace/buzz/buzz.json @@ -25,9 +25,9 @@ "public": 1, "quick_lists": [ { - "document_type": "FE Event", + "document_type": "Buzz Event", "label": "Events this Month", - "quick_list_filter": "[[\"FE Event\",\"start_date\",\"Timespan\",\"this month\",false]]" + "quick_list_filter": "[[\"Buzz Event\",\"start_date\",\"Timespan\",\"this month\",false]]" } ], "roles": [], @@ -54,7 +54,7 @@ "color": "Grey", "doc_view": "New", "label": "Create New Event", - "link_to": "FE Event", + "link_to": "Buzz Event", "stats_filter": "[]", "type": "DocType" }, @@ -63,8 +63,8 @@ "doc_view": "List", "format": "{} Published", "label": "Events", - "link_to": "FE Event", - "stats_filter": "[[\"FE Event\",\"is_published\",\"=\",1,false]]", + "link_to": "Buzz Event", + "stats_filter": "[[\"Buzz Event\",\"is_published\",\"=\",1,false]]", "type": "DocType" }, { @@ -88,7 +88,7 @@ "doc_view": "List", "label": "Events Overview Report", "link_to": "Event Overview", - "report_ref_doctype": "FE Event", + "report_ref_doctype": "Buzz Event", "type": "Report" }, { diff --git a/buzz/events/doctype/additional_event_page/additional_event_page.json b/buzz/events/doctype/additional_event_page/additional_event_page.json index 83383d6f..e2727d82 100644 --- a/buzz/events/doctype/additional_event_page/additional_event_page.json +++ b/buzz/events/doctype/additional_event_page/additional_event_page.json @@ -19,7 +19,7 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Event", - "options": "FE Event", + "options": "Buzz Event", "reqd": 1 }, { diff --git a/buzz/events/doctype/additional_event_page/additional_event_page.py b/buzz/events/doctype/additional_event_page/additional_event_page.py index 0639430e..e2f34838 100644 --- a/buzz/events/doctype/additional_event_page/additional_event_page.py +++ b/buzz/events/doctype/additional_event_page/additional_event_page.py @@ -27,7 +27,7 @@ def validate(self): def validate_route(self): if self.is_published and not self.route: event_is_published, event_route = frappe.db.get_value( - "FE Event", self.event, ["is_published", "route"] + "Buzz Event", self.event, ["is_published", "route"] ) if not event_is_published: diff --git a/buzz/events/doctype/event_management_settings/__init__.py b/buzz/events/doctype/buzz_event/__init__.py similarity index 100% rename from buzz/events/doctype/event_management_settings/__init__.py rename to buzz/events/doctype/buzz_event/__init__.py diff --git a/buzz/events/doctype/fe_event/fe_event.js b/buzz/events/doctype/buzz_event/buzz_event.js similarity index 95% rename from buzz/events/doctype/fe_event/fe_event.js rename to buzz/events/doctype/buzz_event/buzz_event.js index 804ab677..4aea7717 100644 --- a/buzz/events/doctype/fe_event/fe_event.js +++ b/buzz/events/doctype/buzz_event/buzz_event.js @@ -1,7 +1,7 @@ // Copyright (c) 2025, BWH Studios and contributors // For license information, please see license.txt -frappe.ui.form.on("FE Event", { +frappe.ui.form.on("Buzz Event", { refresh(frm) { frappe.call("frappe.geo.country_info.get_country_timezone_info").then(({ message }) => { frm.fields_dict.time_zone.set_data(message.all_timezones); diff --git a/buzz/events/doctype/fe_event/fe_event.json b/buzz/events/doctype/buzz_event/buzz_event.json similarity index 99% rename from buzz/events/doctype/fe_event/fe_event.json rename to buzz/events/doctype/buzz_event/buzz_event.json index 1bb5ee05..006ca560 100644 --- a/buzz/events/doctype/fe_event/fe_event.json +++ b/buzz/events/doctype/buzz_event/buzz_event.json @@ -298,7 +298,7 @@ "modified": "2025-10-10 15:06:55.236743", "modified_by": "Administrator", "module": "Events", - "name": "FE Event", + "name": "Buzz Event", "naming_rule": "Autoincrement", "owner": "Administrator", "permissions": [ diff --git a/buzz/events/doctype/fe_event/fe_event.py b/buzz/events/doctype/buzz_event/buzz_event.py similarity index 98% rename from buzz/events/doctype/fe_event/fe_event.py rename to buzz/events/doctype/buzz_event/buzz_event.py index 9b3d7d21..9fd315ac 100644 --- a/buzz/events/doctype/fe_event/fe_event.py +++ b/buzz/events/doctype/buzz_event/buzz_event.py @@ -5,7 +5,7 @@ from frappe.model.document import Document -class FEEvent(Document): +class BuzzEvent(Document): # begin: auto-generated types # This code is auto-generated. Do not modify anything in this block. diff --git a/buzz/events/doctype/fe_event/test_fe_event.py b/buzz/events/doctype/buzz_event/test_buzz_event.py similarity index 100% rename from buzz/events/doctype/fe_event/test_fe_event.py rename to buzz/events/doctype/buzz_event/test_buzz_event.py diff --git a/buzz/events/doctype/fe_event/__init__.py b/buzz/events/doctype/buzz_settings/__init__.py similarity index 100% rename from buzz/events/doctype/fe_event/__init__.py rename to buzz/events/doctype/buzz_settings/__init__.py diff --git a/buzz/events/doctype/event_management_settings/event_management_settings.js b/buzz/events/doctype/buzz_settings/buzz_settings.js similarity index 72% rename from buzz/events/doctype/event_management_settings/event_management_settings.js rename to buzz/events/doctype/buzz_settings/buzz_settings.js index ad77fdaf..4889101c 100644 --- a/buzz/events/doctype/event_management_settings/event_management_settings.js +++ b/buzz/events/doctype/buzz_settings/buzz_settings.js @@ -1,7 +1,7 @@ // Copyright (c) 2025, BWH Studios and contributors // For license information, please see license.txt -// frappe.ui.form.on("Event Management Settings", { +// frappe.ui.form.on("Buzz Settings", { // refresh(frm) { // }, diff --git a/buzz/events/doctype/event_management_settings/event_management_settings.json b/buzz/events/doctype/buzz_settings/buzz_settings.json similarity index 98% rename from buzz/events/doctype/event_management_settings/event_management_settings.json rename to buzz/events/doctype/buzz_settings/buzz_settings.json index c4be5e04..7e32bb43 100644 --- a/buzz/events/doctype/event_management_settings/event_management_settings.json +++ b/buzz/events/doctype/buzz_settings/buzz_settings.json @@ -91,7 +91,7 @@ "modified": "2025-10-09 14:29:56.127215", "modified_by": "Administrator", "module": "Events", - "name": "Event Management Settings", + "name": "Buzz Settings", "owner": "Administrator", "permissions": [ { @@ -109,4 +109,4 @@ "sort_field": "creation", "sort_order": "DESC", "states": [] -} +} \ No newline at end of file diff --git a/buzz/events/doctype/event_management_settings/event_management_settings.py b/buzz/events/doctype/buzz_settings/buzz_settings.py similarity index 97% rename from buzz/events/doctype/event_management_settings/event_management_settings.py rename to buzz/events/doctype/buzz_settings/buzz_settings.py index 2dacaf7a..5c0d58b8 100644 --- a/buzz/events/doctype/event_management_settings/event_management_settings.py +++ b/buzz/events/doctype/buzz_settings/buzz_settings.py @@ -6,7 +6,7 @@ from frappe.model.document import Document -class EventManagementSettings(Document): +class BuzzSettings(Document): # begin: auto-generated types # This code is auto-generated. Do not modify anything in this block. diff --git a/buzz/events/doctype/event_management_settings/test_event_management_settings.py b/buzz/events/doctype/buzz_settings/test_buzz_settings.py similarity index 81% rename from buzz/events/doctype/event_management_settings/test_event_management_settings.py rename to buzz/events/doctype/buzz_settings/test_buzz_settings.py index 79bf2d2d..1a81a8b9 100644 --- a/buzz/events/doctype/event_management_settings/test_event_management_settings.py +++ b/buzz/events/doctype/buzz_settings/test_buzz_settings.py @@ -11,9 +11,9 @@ IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] -class IntegrationTestEventManagementSettings(IntegrationTestCase): +class IntegrationTestBuzzSettings(IntegrationTestCase): """ - Integration tests for EventManagementSettings. + Integration tests for BuzzSettings. Use this class for testing interactions between multiple components. """ diff --git a/buzz/events/doctype/event_check_in/event_check_in.json b/buzz/events/doctype/event_check_in/event_check_in.json index d0c53f65..25126e0c 100644 --- a/buzz/events/doctype/event_check_in/event_check_in.json +++ b/buzz/events/doctype/event_check_in/event_check_in.json @@ -33,7 +33,7 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Event", - "options": "FE Event", + "options": "Buzz Event", "reqd": 1 }, { diff --git a/buzz/events/doctype/event_feedback/event_feedback.json b/buzz/events/doctype/event_feedback/event_feedback.json index 20b0a552..f3e13e45 100644 --- a/buzz/events/doctype/event_feedback/event_feedback.json +++ b/buzz/events/doctype/event_feedback/event_feedback.json @@ -14,7 +14,7 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Event", - "options": "FE Event", + "options": "Buzz Event", "reqd": 1 }, { diff --git a/buzz/events/doctype/event_sponsor/event_sponsor.json b/buzz/events/doctype/event_sponsor/event_sponsor.json index a960360f..f1bd8046 100644 --- a/buzz/events/doctype/event_sponsor/event_sponsor.json +++ b/buzz/events/doctype/event_sponsor/event_sponsor.json @@ -25,7 +25,7 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Event", - "options": "FE Event", + "options": "Buzz Event", "reqd": 1 }, { @@ -75,7 +75,7 @@ "image_field": "company_logo", "index_web_pages_for_search": 1, "links": [], - "modified": "2025-10-09 18:53:04.166283", + "modified": "2025-10-28 16:18:05.658346", "modified_by": "Administrator", "module": "Events", "name": "Event Sponsor", diff --git a/buzz/events/doctype/event_sponsor/test_event_sponsor.py b/buzz/events/doctype/event_sponsor/test_event_sponsor.py index 6f8e0e84..3ac0d064 100644 --- a/buzz/events/doctype/event_sponsor/test_event_sponsor.py +++ b/buzz/events/doctype/event_sponsor/test_event_sponsor.py @@ -18,7 +18,7 @@ class IntegrationTestEventSponsor(IntegrationTestCase): """ def test_enquiry_to_sponsor_flow(self): - test_event = frappe.get_doc("FE Event", {"route": "test-route"}) + test_event = frappe.get_doc("Buzz Event", {"route": "test-route"}) test_sponsorship_tier = frappe.get_doc( { "doctype": "Sponsorship Tier", diff --git a/buzz/events/doctype/event_track/event_track.json b/buzz/events/doctype/event_track/event_track.json index d5b83a29..5c99cbfc 100644 --- a/buzz/events/doctype/event_track/event_track.json +++ b/buzz/events/doctype/event_track/event_track.json @@ -14,14 +14,14 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Event", - "options": "FE Event", + "options": "Buzz Event", "reqd": 1 } ], "grid_page_length": 50, "index_web_pages_for_search": 1, "links": [], - "modified": "2025-07-29 19:36:02.917560", + "modified": "2025-10-28 16:18:05.552522", "modified_by": "Administrator", "module": "Events", "name": "Event Track", diff --git a/buzz/events/doctype/sponsorship_tier/sponsorship_tier.json b/buzz/events/doctype/sponsorship_tier/sponsorship_tier.json index 57c1587d..354239b3 100644 --- a/buzz/events/doctype/sponsorship_tier/sponsorship_tier.json +++ b/buzz/events/doctype/sponsorship_tier/sponsorship_tier.json @@ -17,7 +17,7 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Event", - "options": "FE Event", + "options": "Buzz Event", "reqd": 1 }, { @@ -48,7 +48,7 @@ "grid_page_length": 50, "index_web_pages_for_search": 1, "links": [], - "modified": "2025-10-10 15:07:20.097690", + "modified": "2025-10-28 16:17:50.389537", "modified_by": "Administrator", "module": "Events", "name": "Sponsorship Tier", diff --git a/buzz/events/report/event_overview/event_overview.js b/buzz/events/report/event_overview/event_overview.js index 61cfb915..86c921ec 100644 --- a/buzz/events/report/event_overview/event_overview.js +++ b/buzz/events/report/event_overview/event_overview.js @@ -7,7 +7,7 @@ frappe.query_reports["Event Overview"] = { fieldname: "event", label: __("Event"), fieldtype: "Link", - options: "FE Event", + options: "Buzz Event", }, ], }; diff --git a/buzz/events/report/event_overview/event_overview.json b/buzz/events/report/event_overview/event_overview.json index 16568797..a5717fa0 100644 --- a/buzz/events/report/event_overview/event_overview.json +++ b/buzz/events/report/event_overview/event_overview.json @@ -16,7 +16,7 @@ "name": "Event Overview", "owner": "Administrator", "prepared_report": 0, - "ref_doctype": "FE Event", + "ref_doctype": "Buzz Event", "report_name": "Event Overview", "report_type": "Script Report", "roles": [ diff --git a/buzz/events/report/event_overview/event_overview.py b/buzz/events/report/event_overview/event_overview.py index 1a6fbb31..a6ccfbe0 100644 --- a/buzz/events/report/event_overview/event_overview.py +++ b/buzz/events/report/event_overview/event_overview.py @@ -28,7 +28,7 @@ def get_columns() -> list[dict]: "label": _("Event"), "fieldname": "event", "fieldtype": "Link", - "options": "FE Event", + "options": "Buzz Event", "width": 200, }, { @@ -52,7 +52,7 @@ def get_data(filters: dict) -> list[dict]: return [get_summary_for_event(event)] data = [] - events = frappe.db.get_all("FE Event", pluck="name") + events = frappe.db.get_all("Buzz Event", pluck="name") for event in events: summary = get_summary_for_event(event) summary["event"] = event diff --git a/buzz/install.py b/buzz/install.py index c6f97657..c5d5a722 100644 --- a/buzz/install.py +++ b/buzz/install.py @@ -16,12 +16,12 @@ def setup_test_records(): ignore_if_duplicate=True ) - test_event_exists = frappe.db.exists("FE Event", {"route": "test-route"}) + test_event_exists = frappe.db.exists("Buzz Event", {"route": "test-route"}) if test_event_exists: - frappe.delete_doc("FE Event", test_event_exists, force=True) + frappe.delete_doc("Buzz Event", test_event_exists, force=True) frappe.get_doc( { - "doctype": "FE Event", + "doctype": "Buzz Event", "category": test_category.name, "venue": test_venue.name, "host": test_host.name, diff --git a/buzz/patches.txt b/buzz/patches.txt index f15c3a90..63b8b46b 100644 --- a/buzz/patches.txt +++ b/buzz/patches.txt @@ -1,6 +1,7 @@ [pre_model_sync] +buzz.patches.rename_doctypes_for_buzz # Patches added in this section will be executed before doctypes are migrated # Read docs to understand patches: https://frappeframework.com/docs/v14/user/en/database-migrations [post_model_sync] -# Patches added in this section will be executed after doctypes are migrated \ No newline at end of file +# Patches added in this section will be executed after doctypes are migrated diff --git a/buzz/patches/rename_doctypes_for_buzz.py b/buzz/patches/rename_doctypes_for_buzz.py new file mode 100644 index 00000000..36620213 --- /dev/null +++ b/buzz/patches/rename_doctypes_for_buzz.py @@ -0,0 +1,29 @@ +import frappe + +doctypes = { + "Event Management Settings": "Buzz Settings", + "Buzz Event": "Buzz Event", +} + + +def execute(): + rename_doctypes() + create_sequences() + +def rename_doctypes(): + for old in doctypes: + new = doctypes[old] + if not frappe.db.exists("DocType", new): + print(f"Renaming {old} to {new}") + frappe.rename_doc("DocType", old, new, force=True, ignore_if_exists=True) + +def create_sequences(): + doctype = "Buzz Event" + sequence_name = frappe.scrub(doctype + "_id_seq") + frappe.db.sql_ddl(f"drop sequence if exists {sequence_name}") + last_name = frappe.db.get_all(doctype, fields=["max(name) as last"])[0].last + start_value = (last_name or 0) + 1 + print(f"Creating sequence for {doctype} starting at {start_value}") + frappe.db.create_sequence( + doctype, start_value=start_value, check_not_exists=True + ) diff --git a/buzz/payments.py b/buzz/payments.py index 8c86a6f1..2ad2ff3d 100644 --- a/buzz/payments.py +++ b/buzz/payments.py @@ -3,7 +3,7 @@ def get_payment_gateway_for_event(event: str): - return frappe.get_cached_value("FE Event", event, "payment_gateway") + return frappe.get_cached_value("Buzz Event", event, "payment_gateway") def get_controller(payment_gateway): @@ -13,7 +13,7 @@ def get_controller(payment_gateway): @frappe.whitelist() def get_payment_link_for_booking(booking_id: str, redirect_to: str = "/events") -> str: booking_doc = frappe.get_cached_doc("Event Booking", booking_id) - event_title = frappe.get_cached_value("FE Event", booking_doc.event, "title") + event_title = frappe.get_cached_value("Buzz Event", booking_doc.event, "title") payment_gateway = get_payment_gateway_for_event(booking_doc.event) return get_payment_link( "Event Booking", @@ -32,7 +32,7 @@ def get_payment_link_for_sponsorship( ) -> str: tier_doc = frappe.get_cached_doc("Sponsorship Tier", sponsorship_tier) payment_gateway = get_payment_gateway_for_event(tier_doc.event) - event_title = frappe.get_cached_value("FE Event", tier_doc.event, "title") + event_title = frappe.get_cached_value("Buzz Event", tier_doc.event, "title") frappe.db.set_value( "Sponsorship Enquiry", sponsorship_enquiry, "tier", sponsorship_tier ) # TODO: rethink later diff --git a/buzz/proposals/doctype/sponsorship_enquiry/sponsorship_enquiry.json b/buzz/proposals/doctype/sponsorship_enquiry/sponsorship_enquiry.json index d85f3372..e464b848 100644 --- a/buzz/proposals/doctype/sponsorship_enquiry/sponsorship_enquiry.json +++ b/buzz/proposals/doctype/sponsorship_enquiry/sponsorship_enquiry.json @@ -54,7 +54,7 @@ "fieldname": "event", "fieldtype": "Link", "label": "Event", - "options": "FE Event", + "options": "Buzz Event", "reqd": 1 }, { @@ -83,7 +83,7 @@ "link_fieldname": "reference_docname" } ], - "modified": "2025-10-09 18:52:42.004977", + "modified": "2025-10-28 16:17:50.193685", "modified_by": "Administrator", "module": "Proposals", "name": "Sponsorship Enquiry", diff --git a/buzz/proposals/doctype/talk_proposal/talk_proposal.json b/buzz/proposals/doctype/talk_proposal/talk_proposal.json index a4ad9c9b..4ef1bca2 100644 --- a/buzz/proposals/doctype/talk_proposal/talk_proposal.json +++ b/buzz/proposals/doctype/talk_proposal/talk_proposal.json @@ -44,7 +44,7 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Event", - "options": "FE Event", + "options": "Buzz Event", "reqd": 1 }, { @@ -70,7 +70,7 @@ "grid_page_length": 50, "index_web_pages_for_search": 1, "links": [], - "modified": "2025-10-09 18:59:47.106852", + "modified": "2025-10-28 16:17:50.098847", "modified_by": "Administrator", "module": "Proposals", "name": "Talk Proposal", diff --git a/buzz/proposals/doctype/talk_proposal/talk_proposal.py b/buzz/proposals/doctype/talk_proposal/talk_proposal.py index d8208a9e..490cca2f 100644 --- a/buzz/proposals/doctype/talk_proposal/talk_proposal.py +++ b/buzz/proposals/doctype/talk_proposal/talk_proposal.py @@ -12,9 +12,8 @@ class TalkProposal(Document): from typing import TYPE_CHECKING if TYPE_CHECKING: - from frappe.types import DF - from buzz.proposals.doctype.proposal_speaker.proposal_speaker import ProposalSpeaker + from frappe.types import DF description: DF.TextEditor | None event: DF.Link diff --git a/buzz/templates/emails/ticket.html b/buzz/templates/emails/ticket.html index b8f7fd8e..d02fc54e 100644 --- a/buzz/templates/emails/ticket.html +++ b/buzz/templates/emails/ticket.html @@ -288,7 +288,7 @@ --> - {% set event_settings = frappe.get_cached_doc("Event Management Settings") %} + {% set event_settings = frappe.get_cached_doc("Buzz Settings") %} {% if event_settings.support_email %} Hi there!

diff --git a/buzz/ticketing/notification/ticket_email_notification/ticket_email_notification.json b/buzz/ticketing/notification/ticket_email_notification/ticket_email_notification.json index a33b2e9b..60fce8bf 100644 --- a/buzz/ticketing/notification/ticket_email_notification/ticket_email_notification.json +++ b/buzz/ticketing/notification/ticket_email_notification/ticket_email_notification.json @@ -11,7 +11,7 @@ "event": "Submit", "idx": 0, "is_standard": 1, - "message": "{% set event_title = frappe.db.get_value(\"FE Event\", doc.event, \"title\") %}\n\n

Hi there!

\n\n

Your ticket is confirmed. We have attached it to this email.

\n\n

\nSee you at the {{ event_title }}!\n

\n", + "message": "{% set event_title = frappe.db.get_value(\"Buzz Event\", doc.event, \"title\") %}\n\n

Hi there!

\n\n

Your ticket is confirmed. We have attached it to this email.

\n\n

\nSee you at the {{ event_title }}!\n

\n", "message_type": "HTML", "minutes_offset": 0, "modified": "2025-08-09 11:44:04.011552", @@ -26,5 +26,5 @@ ], "send_system_notification": 0, "send_to_all_assignees": 0, - "subject": "Here is your ticket to {{ frappe.db.get_value(\"FE Event\", doc.event, \"title\") }}!" + "subject": "Here is your ticket to {{ frappe.db.get_value(\"Buzz Event\", doc.event, \"title\") }}!" } diff --git a/buzz/ticketing/print_format/standard_ticket/standard_ticket.json b/buzz/ticketing/print_format/standard_ticket/standard_ticket.json index 20b78c75..8550595b 100644 --- a/buzz/ticketing/print_format/standard_ticket/standard_ticket.json +++ b/buzz/ticketing/print_format/standard_ticket/standard_ticket.json @@ -9,7 +9,7 @@ "docstatus": 0, "doctype": "Print Format", "font_size": 14, - "html": "\n\n\n \n \n\n\n
\n
\n

{{ frappe.db.get_value(\"FE Event\", doc.event, \"title\") }}

\n

Admit One

\n
\n \n
\n
\n Attendee\n {{ doc.attendee_name }}\n
\n \n
\n Email\n {{ doc.attendee_email }}\n
\n \n \n
\n Ticket Type\n {{ frappe.db.get_value(\"Event Ticket Type\", doc.ticket_type, \"title\") }}\n
\n \n
\n Booking Ref\n {{ doc.booking }}\n
\n \n
\n Booking Date\n {{ frappe.format_date(doc.creation) }}\n
\n \n {% if doc.add_ons %}\n
\n

Add-ons

\n {% for addon in doc.add_ons %}\n
\n {{ frappe.db.get_value(\"Ticket Add-on\", addon.add_on, \"title\") }}\n {{ addon.value }}\n
\n {% endfor %}\n
\n {% endif %}\n \n
\n
\n {% if doc.qr_code %}\n \"QR\n {% else %}\n
\n QR Code\n
\n {% endif %}\n
\n
Scan for Entry
\n
\n
\n \n
\n
{{ doc.name }}
\n
\n
\n\n", + "html": "\n\n\n \n \n\n\n
\n
\n

{{ frappe.db.get_value(\"Buzz Event\", doc.event, \"title\") }}

\n

Admit One

\n
\n \n
\n
\n Attendee\n {{ doc.attendee_name }}\n
\n \n
\n Email\n {{ doc.attendee_email }}\n
\n \n \n
\n Ticket Type\n {{ frappe.db.get_value(\"Event Ticket Type\", doc.ticket_type, \"title\") }}\n
\n \n
\n Booking Ref\n {{ doc.booking }}\n
\n \n
\n Booking Date\n {{ frappe.format_date(doc.creation) }}\n
\n \n {% if doc.add_ons %}\n
\n

Add-ons

\n {% for addon in doc.add_ons %}\n
\n {{ frappe.db.get_value(\"Ticket Add-on\", addon.add_on, \"title\") }}\n {{ addon.value }}\n
\n {% endfor %}\n
\n {% endif %}\n \n
\n
\n {% if doc.qr_code %}\n \"QR\n {% else %}\n
\n QR Code\n
\n {% endif %}\n
\n
Scan for Entry
\n
\n
\n \n
\n
{{ doc.name }}
\n
\n
\n\n", "idx": 0, "line_breaks": 0, "margin_bottom": 15.0, diff --git a/dashboard/src/components/EventSelector.vue b/dashboard/src/components/EventSelector.vue index 156cd532..793702f3 100644 --- a/dashboard/src/components/EventSelector.vue +++ b/dashboard/src/components/EventSelector.vue @@ -147,7 +147,7 @@ const emit = defineEmits(["select"]); const availableEvents = ref([]); const eventsResource = createListResource({ - doctype: "FE Event", + doctype: "Buzz Event", fields: ["name", "title", "start_date", "start_time", "end_date", "end_time"], order_by: "start_date desc", filters: { From 8b4bd195b11cbaf0fd6e99217db3863b82954174 Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Tue, 28 Oct 2025 16:51:52 +0530 Subject: [PATCH 2/2] fix: linter --- buzz/hooks.py | 6 +++--- buzz/patches/rename_doctypes_for_buzz.py | 8 ++++---- buzz/proposals/doctype/talk_proposal/talk_proposal.py | 3 ++- buzz/ticketing/doctype/event_booking/event_booking.py | 3 ++- buzz/ticketing/doctype/event_ticket/event_ticket.py | 3 ++- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/buzz/hooks.py b/buzz/hooks.py index de99293e..de5b3fa3 100644 --- a/buzz/hooks.py +++ b/buzz/hooks.py @@ -30,9 +30,9 @@ before_tests = "buzz.install.before_tests" doc_events = { - "User": { - "after_insert": "buzz.utils.add_buzz_user_role", - "on_update": "buzz.events.doctype.speaker_profile.speaker_profile.update_speaker_display_name" + "User": { + "after_insert": "buzz.utils.add_buzz_user_role", + "on_update": "buzz.events.doctype.speaker_profile.speaker_profile.update_speaker_display_name", }, } diff --git a/buzz/patches/rename_doctypes_for_buzz.py b/buzz/patches/rename_doctypes_for_buzz.py index 36620213..fc2f587c 100644 --- a/buzz/patches/rename_doctypes_for_buzz.py +++ b/buzz/patches/rename_doctypes_for_buzz.py @@ -1,7 +1,7 @@ import frappe doctypes = { - "Event Management Settings": "Buzz Settings", + "Event Management Settings": "Buzz Settings", "Buzz Event": "Buzz Event", } @@ -10,6 +10,7 @@ def execute(): rename_doctypes() create_sequences() + def rename_doctypes(): for old in doctypes: new = doctypes[old] @@ -17,6 +18,7 @@ def rename_doctypes(): print(f"Renaming {old} to {new}") frappe.rename_doc("DocType", old, new, force=True, ignore_if_exists=True) + def create_sequences(): doctype = "Buzz Event" sequence_name = frappe.scrub(doctype + "_id_seq") @@ -24,6 +26,4 @@ def create_sequences(): last_name = frappe.db.get_all(doctype, fields=["max(name) as last"])[0].last start_value = (last_name or 0) + 1 print(f"Creating sequence for {doctype} starting at {start_value}") - frappe.db.create_sequence( - doctype, start_value=start_value, check_not_exists=True - ) + frappe.db.create_sequence(doctype, start_value=start_value, check_not_exists=True) diff --git a/buzz/proposals/doctype/talk_proposal/talk_proposal.py b/buzz/proposals/doctype/talk_proposal/talk_proposal.py index 490cca2f..d8208a9e 100644 --- a/buzz/proposals/doctype/talk_proposal/talk_proposal.py +++ b/buzz/proposals/doctype/talk_proposal/talk_proposal.py @@ -12,9 +12,10 @@ class TalkProposal(Document): from typing import TYPE_CHECKING if TYPE_CHECKING: - from buzz.proposals.doctype.proposal_speaker.proposal_speaker import ProposalSpeaker from frappe.types import DF + from buzz.proposals.doctype.proposal_speaker.proposal_speaker import ProposalSpeaker + description: DF.TextEditor | None event: DF.Link speakers: DF.Table[ProposalSpeaker] diff --git a/buzz/ticketing/doctype/event_booking/event_booking.py b/buzz/ticketing/doctype/event_booking/event_booking.py index 9b084389..76801715 100644 --- a/buzz/ticketing/doctype/event_booking/event_booking.py +++ b/buzz/ticketing/doctype/event_booking/event_booking.py @@ -16,9 +16,10 @@ class EventBooking(Document): from typing import TYPE_CHECKING if TYPE_CHECKING: - from buzz.ticketing.doctype.event_booking_attendee.event_booking_attendee import EventBookingAttendee from frappe.types import DF + from buzz.ticketing.doctype.event_booking_attendee.event_booking_attendee import EventBookingAttendee + amended_from: DF.Link | None attendees: DF.Table[EventBookingAttendee] currency: DF.Link diff --git a/buzz/ticketing/doctype/event_ticket/event_ticket.py b/buzz/ticketing/doctype/event_ticket/event_ticket.py index 170c2ada..ab1cea1a 100644 --- a/buzz/ticketing/doctype/event_ticket/event_ticket.py +++ b/buzz/ticketing/doctype/event_ticket/event_ticket.py @@ -13,9 +13,10 @@ class EventTicket(Document): from typing import TYPE_CHECKING if TYPE_CHECKING: - from buzz.ticketing.doctype.ticket_add_on_value.ticket_add_on_value import TicketAddonValue from frappe.types import DF + from buzz.ticketing.doctype.ticket_add_on_value.ticket_add_on_value import TicketAddonValue + add_ons: DF.Table[TicketAddonValue] amended_from: DF.Link | None attendee_email: DF.Data