Reopens 31014 - Changes to bug reporting storage and handling (#31763)

* initial work on migration to DB

* another step

* update report on submission

* syntax corrections

* syntax fix

* uses 2 bits to record rejections differently and makes the verb only create one bug report datum

* uses the correct value for the index this time

* fixes reading a specific bug report

* updates sql version

* oops

* changes the update file

* Update 71-72.sql

* adds detail to the comment in the update file

* remakes the bug report table instead of altering it

* change time2text for current time to SQL time

* selects columns explicitly

* change sql version in the code

* renamed load_to_db to save_to_db for clarity

* schema formatting and rounds can no longer be null

* messages all relevant roles when a bug report is made and also

* Prevents bug reports from being modified or handled by more than one person at a time

* Update tgui.bundle.js

* uses span macros in bug_report

* replaces usr with client var in bug report view proc

* Update debug.dm

* bundle rebuild, rest of reviews

---------

Co-authored-by: Migratingcocofruit <guycxz@gmail.com>
This commit is contained in:
Miles
2026-03-23 17:26:55 +00:00
committed by GitHub
co-authored by Migratingcocofruit
parent 6802e164a2
commit 1395883465
13 changed files with 202 additions and 135 deletions
+7
View File
@@ -13,6 +13,13 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
if(C.prefs && !(C.prefs.toggles & PREFTOGGLE_CHAT_NO_ADMINLOGS))
to_chat(C, msg, MESSAGE_TYPE_ADMINLOG, confidential = TRUE)
/// Sends a message to all players with a role and the specified permissions
/proc/message_roles(msg, permissions)
for(var/client/C in GLOB.admins)
if(check_rights_client(permissions, FALSE, C))
to_chat(C, msg)
SEND_SOUND(C, sound('sound/effects/bug_report.ogg'))
/proc/msg_admin_attack(text, loglevel)
if(!GLOB.nologevent)
var/rendered = SPAN_ADMIN(SPAN_PREFIX("ATTACK:</span> <span class='message'>[text]") )
+7 -5
View File
@@ -616,14 +616,16 @@ USER_VERB(debug_clean_radiation, R_DEBUG, "Remove All Radiation", "Remove all ra
log_and_message_admins_no_usr("The world has been decontaminated of [counter] radiation components.")
USER_VERB(view_bug_reports, R_DEBUG|R_VIEWRUNTIMES|R_ADMIN, "View Bug Reports", "Select a bug report to view", VERB_CATEGORY_DEBUG)
if(!length(GLOB.bug_reports))
var/list/bug_reports = read_bug_report_titles()
if(!length(bug_reports))
to_chat(client, SPAN_WARNING("There are no bug reports to view"))
return
var/list/bug_report_selection = list()
for(var/datum/tgui_bug_report_form/report in GLOB.bug_reports)
bug_report_selection["[report.initial_key] - [report.bug_report_data["title"]]"] = report
var/datum/tgui_bug_report_form/form = bug_report_selection[tgui_input_list(client, "Select a report to view:", "Bug Reports", bug_report_selection)]
var/selection = tgui_input_list(client, "Select a report to view:", "Bug Reports", bug_reports)
if(!bug_reports[selection])
return
var/datum/tgui_bug_report_form/form = read_bug_report(bug_reports[selection])
if(!form?.assign_approver(client.mob))
qdel(form)
return
form.ui_interact(client.mob)