Skip to content

URB-3651: Add index and widget to filter by last received NOTICe notification - #603

Open
daggelpop wants to merge 3 commits into
2.9.xfrom
URB-3651_last_received_notification_widget
Open

URB-3651: Add index and widget to filter by last received NOTICe notification#603
daggelpop wants to merge 3 commits into
2.9.xfrom
URB-3651_last_received_notification_widget

Conversation

@daggelpop

@daggelpop daggelpop commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added a new advanced date-range filter, “Dernier événement reçu”, to relevant dashboards.
    • Users can filter by the date of the last received notice notification, with a selectable window covering the previous and next ten calendar years.
  • Chores
    • Existing installations are automatically updated to enable the new filtering capability, including the necessary reindexing.

@daggelpop
daggelpop requested a review from mpeeters July 28, 2026 13:16
@coderabbitai

coderabbitai Bot commented Jul 28, 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 Plus

Run ID: a0c6e12e-6d76-4b76-9fb1-d3fca040127b

📥 Commits

Reviewing files that changed from the base of the PR and between c5292e1 and 62c184a.

📒 Files selected for processing (36)
  • src/Products/urban/dashboard/config/all.xml
  • src/Products/urban/dashboard/config/article127s.xml
  • src/Products/urban/dashboard/config/buildlicences.xml
  • src/Products/urban/dashboard/config/codt_article127s.xml
  • src/Products/urban/dashboard/config/codt_buildlicences.xml
  • src/Products/urban/dashboard/config/codt_commerciallicences.xml
  • src/Products/urban/dashboard/config/codt_integratedlicences.xml
  • src/Products/urban/dashboard/config/codt_notaryletters.xml
  • src/Products/urban/dashboard/config/codt_parceloutlicences.xml
  • src/Products/urban/dashboard/config/codt_uniqueborderinglicences.xml
  • src/Products/urban/dashboard/config/codt_uniquelicences.xml
  • src/Products/urban/dashboard/config/codt_urbancertificateones.xml
  • src/Products/urban/dashboard/config/codt_urbancertificatetwos.xml
  • src/Products/urban/dashboard/config/declarations.xml
  • src/Products/urban/dashboard/config/divisions.xml
  • src/Products/urban/dashboard/config/envclassborderings.xml
  • src/Products/urban/dashboard/config/envclassones.xml
  • src/Products/urban/dashboard/config/envclassthrees.xml
  • src/Products/urban/dashboard/config/envclasstwos.xml
  • src/Products/urban/dashboard/config/explosivespossessions.xml
  • src/Products/urban/dashboard/config/housings.xml
  • src/Products/urban/dashboard/config/import_notice.xml
  • src/Products/urban/dashboard/config/inspections.xml
  • src/Products/urban/dashboard/config/integratedlicences.xml
  • src/Products/urban/dashboard/config/miscdemands.xml
  • src/Products/urban/dashboard/config/notaryletters.xml
  • src/Products/urban/dashboard/config/parceloutlicences.xml
  • src/Products/urban/dashboard/config/patrimonycertificates.xml
  • src/Products/urban/dashboard/config/preliminarynotices.xml
  • src/Products/urban/dashboard/config/projectmeetings.xml
  • src/Products/urban/dashboard/config/roaddecrees.xml
  • src/Products/urban/dashboard/config/tickets.xml
  • src/Products/urban/dashboard/config/uniquelicences.xml
  • src/Products/urban/dashboard/config/urbancertificateones.xml
  • src/Products/urban/dashboard/config/urbancertificatetwos.xml
  • src/Products/urban/migration/update_290.py
🚧 Files skipped from review as they are similar to previous changes (36)
  • src/Products/urban/dashboard/config/import_notice.xml
  • src/Products/urban/dashboard/config/all.xml
  • src/Products/urban/dashboard/config/envclassborderings.xml
  • src/Products/urban/dashboard/config/codt_article127s.xml
  • src/Products/urban/dashboard/config/declarations.xml
  • src/Products/urban/dashboard/config/miscdemands.xml
  • src/Products/urban/dashboard/config/tickets.xml
  • src/Products/urban/dashboard/config/inspections.xml
  • src/Products/urban/dashboard/config/parceloutlicences.xml
  • src/Products/urban/dashboard/config/codt_urbancertificatetwos.xml
  • src/Products/urban/dashboard/config/codt_notaryletters.xml
  • src/Products/urban/dashboard/config/codt_commerciallicences.xml
  • src/Products/urban/dashboard/config/divisions.xml
  • src/Products/urban/dashboard/config/codt_buildlicences.xml
  • src/Products/urban/dashboard/config/roaddecrees.xml
  • src/Products/urban/dashboard/config/preliminarynotices.xml
  • src/Products/urban/dashboard/config/urbancertificateones.xml
  • src/Products/urban/dashboard/config/urbancertificatetwos.xml
  • src/Products/urban/dashboard/config/envclasstwos.xml
  • src/Products/urban/dashboard/config/codt_parceloutlicences.xml
  • src/Products/urban/dashboard/config/buildlicences.xml
  • src/Products/urban/dashboard/config/explosivespossessions.xml
  • src/Products/urban/dashboard/config/uniquelicences.xml
  • src/Products/urban/dashboard/config/codt_uniqueborderinglicences.xml
  • src/Products/urban/dashboard/config/patrimonycertificates.xml
  • src/Products/urban/dashboard/config/notaryletters.xml
  • src/Products/urban/dashboard/config/codt_uniquelicences.xml
  • src/Products/urban/dashboard/config/integratedlicences.xml
  • src/Products/urban/dashboard/config/envclassthrees.xml
  • src/Products/urban/dashboard/config/envclassones.xml
  • src/Products/urban/dashboard/config/article127s.xml
  • src/Products/urban/dashboard/config/housings.xml
  • src/Products/urban/dashboard/config/projectmeetings.xml
  • src/Products/urban/dashboard/config/codt_urbancertificateones.xml
  • src/Products/urban/dashboard/config/codt_integratedlicences.xml
  • src/Products/urban/migration/update_290.py

📝 Walkthrough

Walkthrough

Adds a last_received_notice_notification catalog date index, configures a visible dashboard date filter across licence dashboards, and provides a GenericSetup upgrade that reindexes the field and adds criterion c96 to existing eligible folders.

Changes

Last received notice notification

Layer / File(s) Summary
Notification date indexing
src/Products/urban/indexes.py, src/Products/urban/index.zcml, src/Products/urban/profiles/urban_types/catalog.xml
Indexes the newest event containing an incoming notice notification and registers the value as a catalog DateIndex.
Dashboard filter configuration
news/URB-3651.feature, src/Products/urban/dashboard/config/*.xml
Adds criterion c96, a visible advanced daterange filter titled “Dernier événement reçu” backed by last_received_notice_notification.
Upgrade and existing-folder wiring
src/Products/urban/migration/update_290.py, src/Products/urban/migration/upgrades_290.zcml, src/Products/urban/profiles/default/metadata.xml
Adds the 2919-to-2920 upgrade step, reindexes the new field, and adds criterion c96 to eligible existing folders.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant LicenceEvents
  participant last_received_notice_notification
  participant UrbanCatalog
  participant DashboardCriterion
  LicenceEvents->>last_received_notice_notification: find newest incoming notice event
  last_received_notice_notification->>UrbanCatalog: index notification timestamp
  DashboardCriterion->>UrbanCatalog: apply selected date range
  UrbanCatalog->>DashboardCriterion: return filtered records
Loading

Suggested reviewers: mpeeters

🚥 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 matches the main change: adding a new index and faceted widget/criterion for filtering by the last received notice notification.
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-3651_last_received_notification_widget

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.

Actionable comments posted: 4

🤖 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.

Inline comments:
In `@src/Products/urban/dashboard/config/codt_integratedlicences.xml`:
- Around line 187-196: Move each c96 criterion to the dashboard object matching
its file: in src/Products/urban/dashboard/config/codt_integratedlicences.xml use
codt_integratedlicences (anchor lines 187-196); in
src/Products/urban/dashboard/config/codt_notaryletters.xml use
codt_notaryletters (lines 176-185); in
src/Products/urban/dashboard/config/inspections.xml use inspections (lines
175-184); in src/Products/urban/dashboard/config/integratedlicences.xml use
integratedlicences (lines 176-185); and in
src/Products/urban/dashboard/config/miscdemands.xml use miscdemands (lines
177-186).

In `@src/Products/urban/dashboard/config/codt_uniquelicences.xml`:
- Around line 187-196: Move each c96 criterion under the correct enclosing
GenericSetup object: in
src/Products/urban/dashboard/config/codt_uniquelicences.xml#L187-L196 use
codt_uniquelicences; in
src/Products/urban/dashboard/config/codt_urbancertificatetwos.xml#L187-L196 use
the urban-certificate-twos object; in
src/Products/urban/dashboard/config/declarations.xml#L94-L103 use declarations
instead of schedule; in
src/Products/urban/dashboard/config/divisions.xml#L176-L185 use divisions; and
in src/Products/urban/dashboard/config/envclassborderings.xml#L187-L196,
src/Products/urban/dashboard/config/envclassones.xml#L187-L196, and
src/Products/urban/dashboard/config/envclasstwos.xml#L187-L196 use their
corresponding environmental-class object.

In `@src/Products/urban/dashboard/config/roaddecrees.xml`:
- Around line 164-173: Correct the dashboard root object names before installing
criterion c96: in src/Products/urban/dashboard/config/roaddecrees.xml lines
164-173, rename explosivespossessions to roaddecrees; in
src/Products/urban/dashboard/config/tickets.xml lines 175-184, rename
explosivespossessions to tickets; in
src/Products/urban/dashboard/config/uniquelicences.xml lines 176-185, rename
codt_commerciallicences to uniquelicences; in
src/Products/urban/dashboard/config/urbancertificateones.xml lines 165-174,
rename codt_urbancertificateones to urbancertificateones; and in
src/Products/urban/dashboard/config/urbancertificatetwos.xml lines 176-185,
rename codt_commerciallicences to urbancertificatetwos.

In `@src/Products/urban/migration/update_290.py`:
- Around line 706-738: Update add_last_received_notice_notification to also
include the existing urban/import-notice folder in urban_dashboard_folders when
present, alongside the root and URBAN_TYPES folders. Retrieve it safely and
append it only when available, so the existing c96 criteria creation loop
applies to that dashboard without changing other folder handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2cd664e9-f9ab-46dd-956e-cfed54305929

📥 Commits

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

📒 Files selected for processing (42)
  • news/URB-3651.feature
  • src/Products/urban/dashboard/config/all.xml
  • src/Products/urban/dashboard/config/article127s.xml
  • src/Products/urban/dashboard/config/buildlicences.xml
  • src/Products/urban/dashboard/config/codt_article127s.xml
  • src/Products/urban/dashboard/config/codt_buildlicences.xml
  • src/Products/urban/dashboard/config/codt_commerciallicences.xml
  • src/Products/urban/dashboard/config/codt_integratedlicences.xml
  • src/Products/urban/dashboard/config/codt_notaryletters.xml
  • src/Products/urban/dashboard/config/codt_parceloutlicences.xml
  • src/Products/urban/dashboard/config/codt_uniqueborderinglicences.xml
  • src/Products/urban/dashboard/config/codt_uniquelicences.xml
  • src/Products/urban/dashboard/config/codt_urbancertificateones.xml
  • src/Products/urban/dashboard/config/codt_urbancertificatetwos.xml
  • src/Products/urban/dashboard/config/declarations.xml
  • src/Products/urban/dashboard/config/divisions.xml
  • src/Products/urban/dashboard/config/envclassborderings.xml
  • src/Products/urban/dashboard/config/envclassones.xml
  • src/Products/urban/dashboard/config/envclassthrees.xml
  • src/Products/urban/dashboard/config/envclasstwos.xml
  • src/Products/urban/dashboard/config/explosivespossessions.xml
  • src/Products/urban/dashboard/config/housings.xml
  • src/Products/urban/dashboard/config/import_notice.xml
  • src/Products/urban/dashboard/config/inspections.xml
  • src/Products/urban/dashboard/config/integratedlicences.xml
  • src/Products/urban/dashboard/config/miscdemands.xml
  • src/Products/urban/dashboard/config/notaryletters.xml
  • src/Products/urban/dashboard/config/parceloutlicences.xml
  • src/Products/urban/dashboard/config/patrimonycertificates.xml
  • src/Products/urban/dashboard/config/preliminarynotices.xml
  • src/Products/urban/dashboard/config/projectmeetings.xml
  • src/Products/urban/dashboard/config/roaddecrees.xml
  • src/Products/urban/dashboard/config/tickets.xml
  • src/Products/urban/dashboard/config/uniquelicences.xml
  • src/Products/urban/dashboard/config/urbancertificateones.xml
  • src/Products/urban/dashboard/config/urbancertificatetwos.xml
  • src/Products/urban/index.zcml
  • src/Products/urban/indexes.py
  • src/Products/urban/migration/update_290.py
  • src/Products/urban/migration/upgrades_290.zcml
  • src/Products/urban/profiles/default/metadata.xml
  • src/Products/urban/profiles/urban_types/catalog.xml

Comment thread src/Products/urban/dashboard/config/codt_integratedlicences.xml
Comment thread src/Products/urban/dashboard/config/codt_uniquelicences.xml
Comment thread src/Products/urban/dashboard/config/roaddecrees.xml
Comment thread src/Products/urban/migration/update_290.py
@daggelpop
daggelpop marked this pull request as draft July 29, 2026 07:43
@daggelpop
daggelpop marked this pull request as ready for review July 29, 2026 09:56
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