Skip to content

URB-3640: implement pm ep courrier commune notification#570

Open
WBoudabous wants to merge 5 commits into
2.9.xfrom
URB-3640_implement_PM_EP_COURRIER_COMMUNE_notification
Open

URB-3640: implement pm ep courrier commune notification#570
WBoudabous wants to merge 5 commits into
2.9.xfrom
URB-3640_implement_PM_EP_COURRIER_COMMUNE_notification

Conversation

@WBoudabous

@WBoudabous WBoudabous commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

This PR implements notification handling for PM_EP_COURRIER_COMMUNE

Summary by CodeRabbit

  • New Features
    • Added support for the new public inquiry notification type PM_EP_COURRIER_COMMUNE across modified-plans workflows.
    • Updated transfer workflows to accept this notification type for dates, tickets, and opinions.
  • Bug Fixes
    • Fixed notice routing so PM_EP_COURRIER_COMMUNE is handled by the amended-plans workflow.
  • Documentation
    • Added French translation text for PM_EP_COURRIER_COMMUNE in the UI language resources.
    • Added a short release/news entry covering PM_EP_COURRIER_COMMUNE handling (with attribution).

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4260e462-fbe2-4322-a9e1-2c3c3a043a75

📥 Commits

Reviewing files that changed from the base of the PR and between 6f3b6aa and 0a9e239.

📒 Files selected for processing (6)
  • news/URB-3640.feature
  • src/Products/urban/browser/cron/notice.py
  • src/Products/urban/browser/urbaneventviews.py
  • src/Products/urban/locales/fr/LC_MESSAGES/urban.po
  • src/Products/urban/locales/urban-manual.pot
  • src/Products/urban/locales/urban.pot
✅ Files skipped from review due to trivial changes (3)
  • news/URB-3640.feature
  • src/Products/urban/locales/urban.pot
  • src/Products/urban/locales/fr/LC_MESSAGES/urban.po
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/Products/urban/locales/urban-manual.pot
  • src/Products/urban/browser/urbaneventviews.py

📝 Walkthrough

Walkthrough

This pull request adds support for the PM_EP_COURRIER_COMMUNE notice type across notice handling, transfer views, and localization files.

Changes

Notice Type Feature Enablement

Layer / File(s) Summary
Cron notice handling updates
src/Products/urban/browser/cron/notice.py
notice.py updates the amended-plans handler selection for PM_EP_COURRIER_COMMUNE and reformats notice import logging, error reporting, parcel/address mapping, and fallback descriptions without changing the surrounding control flow.
GÉSPER transfer view acceptance
src/Products/urban/browser/urbaneventviews.py
Three GÉSPER EP transfer views add PM_EP_COURRIER_COMMUNE to their accepted incoming notice types.
Feature text and translations
news/URB-3640.feature, src/Products/urban/locales/fr/LC_MESSAGES/urban.po, src/Products/urban/locales/urban-manual.pot, src/Products/urban/locales/urban.pot
The changelog entry and gettext catalog files add the PM_EP_COURRIER_COMMUNE message and French translation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • IMIO/Products.urban#567: Updates the same notification-routing and transfer-view acceptance paths in notice.py and urbaneventviews.py for other notice types.

Suggested reviewers

  • mpeeters

Poem

A new notice hops through the gate, 🐰
Views and cron now recognize its state,
French words bloom bright and clear,
PM_EP_COURRIER_COMMUNE is here!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding PM_EP_COURRIER_COMMUNE notification handling.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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-3640_implement_PM_EP_COURRIER_COMMUNE_notification

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

@WBoudabous WBoudabous requested a review from mpeeters June 4, 2026 12:32

@mpeeters mpeeters left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you fix the conflict ?

@WBoudabous WBoudabous force-pushed the URB-3640_implement_PM_EP_COURRIER_COMMUNE_notification branch from 7391aa7 to 591781a Compare June 22, 2026 10:12
@mpeeters mpeeters changed the title Urb 3640 implement pm ep courrier commune notification URB-364:0 implement pm ep courrier commune notification Jun 22, 2026

@mpeeters mpeeters left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please fix the comments

"DEMANDE_AVIS_FACULTATIF_PLAN_MODIFIE_1_ERE_INSTANCE",
"DEMANDE_ENQUETE_PUBLIQUE_PLAN_MODIFIE_1_ERE_INSTANCE",
"DEMANDE_ANNONCE_PROJET_PLAN_MODIFIE_1_ERE_INSTANCE",
"DEMANDE_ANNONCE PROJET_PLAN_MODIFIE_1_ERE_INSTANCE",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is a withspace in the code, please remove it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is still a whitespace in the code.

Comment thread src/Products/urban/locales/fr/LC_MESSAGES/urban.po
@mpeeters mpeeters changed the title URB-364:0 implement pm ep courrier commune notification URB-3640: implement pm ep courrier commune notification Jun 22, 2026
@WBoudabous WBoudabous requested a review from mpeeters June 22, 2026 13:09
"DEMANDE_AVIS_FACULTATIF_PLAN_MODIFIE_1_ERE_INSTANCE",
"DEMANDE_ENQUETE_PUBLIQUE_PLAN_MODIFIE_1_ERE_INSTANCE",
"DEMANDE_ANNONCE_PROJET_PLAN_MODIFIE_1_ERE_INSTANCE",
"DEMANDE_ANNONCE PROJET_PLAN_MODIFIE_1_ERE_INSTANCE",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is still a whitespace in the code.

@WBoudabous WBoudabous force-pushed the URB-3640_implement_PM_EP_COURRIER_COMMUNE_notification branch from 6f3b6aa to 0a9e239 Compare June 24, 2026 07:51
@WBoudabous WBoudabous requested a review from mpeeters June 24, 2026 07:52
failed_notice_id, exc, retry=True
)
logger.exception(
u"%s",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Must remain unicode

savepoint.rollback()
custom_exc = ErrorProcessingNotificationException(notice_id, exc)
logger.exception(
u"%s",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Must remain unicode

except Exception as exc:
custom_exc = FailedGettingRecentNotificationsException(exc)
logger.exception(
u"%s",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Must remain unicode

Comment on lines -449 to -453
u"<p>${msg} for informations: ${data}</p>",
"<p>${msg} for informations: ${data}</p>",
mapping={
"msg": msg,
"data": u", ".join(
[u"{0}: {1}".format(k, v) for k, v in serialized_data.items()]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Must remain unicode

self.event.setDecision(urban_decision_term)
else:
self.event.setDescription(
u"Décision: {}".format(self.notification.decision_code)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Must remain unicode

self.event.setDecision(urban_decision_term)
else:
self.event.setDescription(
u"Décision: {}".format(decision_code)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Must remain unicode

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.

2 participants