Skip to content

feat(action): exclude specific representatives + restore targetLaw admin field

Scaffold Digital Fleet requested to merge feat/exclude-reps-law-section into master

Sprint campaign-level (tasks/sprints/2026-09-10-campaign-level.md), both features:

1. Exclude specific representatives (Catalyst request)

  • excludedRepresentatives M2M(Representative) on ActionGroup (migration 0275, additive)
  • Admin: autocomplete + Choix de ciblage fieldset, multi-select — same pattern as excludedParties (!37 (merged))
  • serializer_fields only (url-refs, payload-light)

2. targetLaw admin dropdown — un-silently-dead

The 2024 code registered autocomplete_fields += [targetLaw] but the fieldset-insertion loop matched a nonexistent fieldset name ("Ciblage de décisionnnaires précis") → the field never rendered. Fixed, moved to Informations principales (last item) per Catalyst. Match by fieldset content, robust to renames.

Verification

  • Boot matrix both flags (PLUGIN_LAW_TRACKER on: targetLaw present+autocomplete+last-in-section; off: no trace)
  • migrate + makemigrations --check clean on prod-scale DB copy (only pre-existing Alter-field noise)
  • Live payload check: targetLaw ships as {@id} ref; M2M roundtrip OK

Front side: MR in risefor-front (feat/exclude-reps-law-panel).

Merge request reports