diff --git a/app.go b/app.go index 073ecd8..9f96858 100644 --- a/app.go +++ b/app.go @@ -2452,6 +2452,14 @@ func (a *App) migrateAwardDefs() { applog.Printf("awards: %s updated from the catalog (v%d)", code, defByCode(migrated, code).Version) a.reseedRefsFromCatalog(code) } + // A catalog definition changed (e.g. DDFM gained the postal-code OR-rule), so + // the materialised award_refs on existing QSOs are now stale. Clear the + // one-shot backfill flag; backfillAwardRefsOnce runs later in startup and will + // re-materialise every row against the updated definitions. This makes ANY + // future catalog bump self-heal the stored columns without a manual flag bump. + if len(updated) > 0 { + _ = a.settings.Set(a.ctx, keyAwardsMaterialized, "") + } // Version-gated correction of the built-in awards' Validate sources, which // an earlier version wrongly set equal to Confirm (so VALIDATED == CONFIRMED // even for paper-QSL-only entities). Re-apply the canonical Confirm/Validate diff --git a/internal/award/catalog/ddfm.json b/internal/award/catalog/ddfm.json index 039103e..b56195e 100644 --- a/internal/award/catalog/ddfm.json +++ b/internal/award/catalog/ddfm.json @@ -7,8 +7,17 @@ "type": "QSOFIELDS", "field": "note", "pattern": "(?i)\\b(D\\d{1,2}[AB]?)\\b", + "or_rules": [ + { + "field": "address", + "match_by": "code", + "pattern": "\\b(\\d{2})\\d{3}\\b", + "prefix": "D" + } + ], "dxcc_filter": [ - 227 + 227, + 214 ], "confirm": [ "lotw", @@ -17,7 +26,9 @@ "validate": [ "lotw" ], + "ref_display": "name", "total": 96, - "builtin": true + "builtin": true, + "version": 2 } }