diff --git a/app.go b/app.go index daf0a53..073ecd8 100644 --- a/app.go +++ b/app.go @@ -3415,6 +3415,10 @@ func (a *App) invalidateAwardStats() { // flips qsl_rcvd flags on existing rows). func (a *App) RescanAwards() error { a.invalidateAwardStats() + // Also refresh the materialised award_refs on every QSO (the grid columns read + // from there). Manual trigger for when a definition/reference change should be + // re-applied to existing rows on demand rather than waiting for the next event. + a.recomputeAwardRefsAsync() return nil } @@ -3821,7 +3825,12 @@ func (a *App) recomputeAwardRefsAsync() { // keyAwardsMaterialized marks (per profile / logbook) that the one-time award_refs // backfill has run, so it doesn't re-scan the whole logbook on every launch. -const keyAwardsMaterialized = "awards.materialized.v1" +// keyAwardsMaterialized is versioned: bump the suffix to force every operator to +// re-materialise award_refs once on next launch. Needed when the stored values +// could be stale against the CURRENT award definitions — e.g. rows materialised +// before an award gained a new matching rule (DDFM's postal-code OR-rule), which +// the one-shot backfill would otherwise never revisit. +const keyAwardsMaterialized = "awards.materialized.v2" // backfillAwardRefsOnce populates award_refs for QSOs that predate the feature // (or were logged by an older client that didn't materialise them). It runs at