Files
ms1inscription-v5/sql/MSIN-4379-inscriptions-evt-erreur.sql
stephan d118f5bce7 Add error handling for missing bib assignments and enhance anomaly reporting
This commit introduces new functions to manage errors related to missing bib assignments, specifically for the 'bib_auto_miss' type. It includes logic to resolve open errors when a bib is manually assigned and adds a new function to retrieve and display anomalies for registrations without assigned bibs. Additionally, the UI is updated to provide users with actionable links for resolving these anomalies, improving overall user experience and error management.
2026-06-19 13:39:39 -04:00

30 lines
1.5 KiB
SQL

/*
MSIN-4379 — Erreurs actionnables inscription (journal générique, pas une table par anomalie).
Usage initial : bib_auto_miss (assignation auto échouée, séquences épuisées).
Ordre : exécuter ce fichier avant MSIN-4379-inscriptions-evt-erreur-i18n.sql
*/
SET NAMES utf8mb4;
CREATE TABLE IF NOT EXISTS `inscriptions_evt_erreur` (
`evt_err_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`evt_err_type` varchar(32) NOT NULL,
`evt_err_statut` enum('ouvert','resolu','ignore') NOT NULL DEFAULT 'ouvert',
`eve_id` int(10) unsigned NOT NULL DEFAULT 0,
`epr_id` int(10) unsigned NOT NULL DEFAULT 0,
`par_id` int(10) unsigned NOT NULL DEFAULT 0,
`pec_id` int(10) unsigned NOT NULL DEFAULT 0,
`no_commande` varchar(30) NOT NULL DEFAULT '',
`no_panier` varchar(20) NOT NULL DEFAULT '',
`com_id` int(10) unsigned NOT NULL DEFAULT 0,
`evt_err_detail` varchar(255) DEFAULT NULL,
`evt_err_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`evt_err_resolved` datetime DEFAULT NULL,
`evt_err_resolved_by` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`evt_err_id`),
KEY `idx_evt_err_eve_statut` (`eve_id`, `evt_err_statut`, `evt_err_type`),
KEY `idx_evt_err_type_epr_par` (`evt_err_type`, `epr_id`, `par_id`, `evt_err_statut`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
COMMENT='Erreurs inscription à traiter par le promoteur (pas journal technique)';