Skip to content

URB-3550: Implement notifications ARRET_PLAN_MODIF_COMMUNE, ARRET_PLAN_MODIF_COMMUNE_MANUELLE - #607

Open
daggelpop wants to merge 1 commit into
2.9.xfrom
URB-3550_notifications_arret
Open

URB-3550: Implement notifications ARRET_PLAN_MODIF_COMMUNE, ARRET_PLAN_MODIF_COMMUNE_MANUELLE#607
daggelpop wants to merge 1 commit into
2.9.xfrom
URB-3550_notifications_arret

Conversation

@daggelpop

@daggelpop daggelpop commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added support for notifications indicating that a procedure has been stopped in favor of an amended plan.
    • Processing these notifications now automatically transitions the associated licence to Suspended.
    • Added support for both standard and manually initiated notifications, including cases involving another municipality.
  • Documentation

    • Added French translations and message catalog entries for the new notification types.

@daggelpop
daggelpop requested a review from mpeeters August 6, 2026 12:28
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The notification system now recognizes two amended-plan stoppage notices, routes them to a dedicated handler, emits the amended-plans intention event, sets the licence to suspension, and adds catalog entries.

Changes

Amended plan notifications

Layer / File(s) Summary
Notification classification and handling
src/Products/urban/notice/notification.py, src/Products/urban/browser/cron/notice.py
The two notification types map to ns3:TwiceDefaultRequest, route to StopForAmendedPlansHandler, emit IIntentionToSubmitAmendedPlans, and set the licence state to suspension.
Notification catalog entries
src/Products/urban/locales/..., news/URB-3550.feature
French and template catalogs include both notification identifiers. The feature record tracks the change.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Notification as notification.py
  participant Router as notice.py
  participant Handler as StopForAmendedPlansHandler
  participant Licence as Licence
  Notification->>Router: classify amended-plan stop notice
  Router->>Handler: route notification
  Handler->>Licence: emit IIntentionToSubmitAmendedPlans
  Handler->>Licence: set state to suspension
Loading

Possibly related PRs

Suggested reviewers: mpeeters, wboudabous

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the implementation of both notification types, which matches the main changes in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch URB-3550_notifications_arret

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/Products/urban/browser/cron/notice.py (1)

688-693: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add regression coverage for both amended-plan stop notices.

Add tests for ARRET_PLAN_MODIF_COMMUNE and ARRET_PLAN_MODIF_COMMUNE_MANUELLE. Verify handler selection, emission of IIntentionToSubmitAmendedPlans, and transition to suspension.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/Products/urban/browser/cron/notice.py` around lines 688 - 693, Add
regression tests for StopForAmendedPlansHandler covering both
ARRET_PLAN_MODIF_COMMUNE and ARRET_PLAN_MODIF_COMMUNE_MANUELLE. Verify each
notice selects this handler, emits IIntentionToSubmitAmendedPlans, and
transitions the licence state to suspension.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/Products/urban/browser/cron/notice.py`:
- Around line 688-693: Add regression tests for StopForAmendedPlansHandler
covering both ARRET_PLAN_MODIF_COMMUNE and ARRET_PLAN_MODIF_COMMUNE_MANUELLE.
Verify each notice selects this handler, emits IIntentionToSubmitAmendedPlans,
and transitions the licence state to suspension.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d3e30285-fa9a-4a20-9506-5f547c4ac3ad

📥 Commits

Reviewing files that changed from the base of the PR and between cfe46fa and 470db6d.

📒 Files selected for processing (6)
  • news/URB-3550.feature
  • src/Products/urban/browser/cron/notice.py
  • src/Products/urban/locales/fr/LC_MESSAGES/urban.po
  • src/Products/urban/locales/urban-manual.pot
  • src/Products/urban/locales/urban.pot
  • src/Products/urban/notice/notification.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant