URB-3659: Add due date to imported summary report events#590
Conversation
📝 WalkthroughWalkthroughAdds ChangesDue date propagation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/Products/urban/browser/cron/notice.py (1)
609-611: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover the
UltimeDatepropagation path with a handler test.The feature value is in the cross-layer assignment, so a handler/import test asserting that a notification
dueDateends up onevent.UltimeDatewould protect this behavior better than parser-only coverage.🤖 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 609 - 611, The UltimeDate propagation in the notification handling path is only covered indirectly, so add a handler/import test that exercises the cross-layer assignment from notification dueDate to event.UltimeDate. Use the existing notification processing flow around the code in notice.py, and assert that when self.notification.due_date is present, the resulting event.setUltimeDate call receives the expected DateTime value. Keep the test focused on the handler-level behavior rather than parser-only coverage.src/Products/urban/notice/notification.py (1)
245-250: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd a regression test for
dueDateparsing.This new property is now part of the import contract, but the supplied changes do not add coverage for valid
dueDatevalues or theNonecase already present in test fixtures. A small parser-level test here would make future format changes much safer.🤖 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/notice/notification.py` around lines 245 - 250, Add a regression test around Notification.due_date to cover both valid dueDate parsing and the existing None/absent case from fixtures. Update the relevant notification parser tests to instantiate or load a Notification object with a sample dueDate string and assert the returned date is parsed correctly, then add a case where dueDate is missing or null and confirm due_date stays falsy/None. Use the due_date property and _get_data("dueDate") behavior as the key entry points when locating the code.
🤖 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 609-611: The UltimeDate propagation in the notification handling
path is only covered indirectly, so add a handler/import test that exercises the
cross-layer assignment from notification dueDate to event.UltimeDate. Use the
existing notification processing flow around the code in notice.py, and assert
that when self.notification.due_date is present, the resulting
event.setUltimeDate call receives the expected DateTime value. Keep the test
focused on the handler-level behavior rather than parser-only coverage.
In `@src/Products/urban/notice/notification.py`:
- Around line 245-250: Add a regression test around Notification.due_date to
cover both valid dueDate parsing and the existing None/absent case from
fixtures. Update the relevant notification parser tests to instantiate or load a
Notification object with a sample dueDate string and assert the returned date is
parsed correctly, then add a case where dueDate is missing or null and confirm
due_date stays falsy/None. Use the due_date property and _get_data("dueDate")
behavior as the key entry points when locating the code.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 34a711ad-7735-4a21-8f38-ec7256bc91c8
📒 Files selected for processing (3)
news/URB-3659.featuresrc/Products/urban/browser/cron/notice.pysrc/Products/urban/notice/notification.py
Note: so far, only summary report notifications have had data in the
dueDatefield.Summary by CodeRabbit
New Features
Bug Fixes