This commit introduces a new function, `fxBibSqlEpreuveHasBibRanges`, to check for the presence of bib ranges in events. It enhances the existing anomaly detection by adding support for cases where no bib ranges are configured, allowing for better reporting of duplicate bibs. Additionally, relevant language strings are added for both French and English to support multilingual reporting. The version code is incremented to reflect these changes.
20 lines
2.4 KiB
SQL
20 lines
2.4 KiB
SQL
-- MSIN-4379 — Anomalies dossards : hors séquence (saisie manuelle, etc.)
|
|
-- Prérequis : sql/MSIN-4379-bib_v4-anomalies-i18n.sql
|
|
-- Idempotent — safe pilote / prod
|
|
|
|
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
|
SELECT 'bib_v4_anomalies_out_of_range_title', 'fr', 'Dossards hors séquence', 'Numéro assigné à un coureur actif mais ne tombant dans aucune séquence configurée pour son épreuve (saisie manuelle sur la fiche, import, etc.).', 'compte.php', '', 0, 1, '', '', '', NOW()
|
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_anomalies_out_of_range_title' AND info_langue = 'fr' AND info_prg = 'compte.php');
|
|
|
|
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
|
SELECT 'bib_v4_anomalies_out_of_range_title', 'en', 'Bibs outside sequences', 'Number assigned to an active runner but not falling within any sequence configured for their race (manual entry on profile, import, etc.).', 'compte.php', '', 0, 1, '', '', '', NOW()
|
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_anomalies_out_of_range_title' AND info_langue = 'en' AND info_prg = 'compte.php');
|
|
|
|
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
|
SELECT 'bib_v4_anomalies_no_range', 'fr', 'Aucune séquence configurée', 'L''épreuve n''a pas de plage de dossards ; les doublons y sont listés dans la section « Dossards en double ».', 'compte.php', '', 0, 1, '', '', '', NOW()
|
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_anomalies_no_range' AND info_langue = 'fr' AND info_prg = 'compte.php');
|
|
|
|
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
|
SELECT 'bib_v4_anomalies_no_range', 'en', 'No sequence configured', 'This race has no bib range; duplicates are listed under « Duplicate bib numbers ».', 'compte.php', '', 0, 1, '', '', '', NOW()
|
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_anomalies_no_range' AND info_langue = 'en' AND info_prg = 'compte.php');
|