From 1dd017a6e6399bc6ee348d087e559038db4b7ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Demont=C3=A9?= Date: Fri, 26 Jun 2026 09:51:17 +0200 Subject: [PATCH] URB-3659: Add due date to imported summary report events --- news/URB-3659.feature | 2 ++ src/Products/urban/browser/cron/notice.py | 5 +++++ src/Products/urban/notice/notification.py | 7 +++++++ 3 files changed, 14 insertions(+) create mode 100644 news/URB-3659.feature diff --git a/news/URB-3659.feature b/news/URB-3659.feature new file mode 100644 index 000000000..9773f812e --- /dev/null +++ b/news/URB-3659.feature @@ -0,0 +1,2 @@ +Add due date to imported summary report events +[daggelpop] \ No newline at end of file diff --git a/src/Products/urban/browser/cron/notice.py b/src/Products/urban/browser/cron/notice.py index a9cf804ba..4bf5588e7 100644 --- a/src/Products/urban/browser/cron/notice.py +++ b/src/Products/urban/browser/cron/notice.py @@ -605,6 +605,11 @@ def desired_licence_state(self): def fill_incoming_event(self): super(SummaryReportHandler, self).fill_incoming_event() + + if self.notification.due_date: + event_date = DateTime(str(self.notification.due_date)) + self.event.setUltimeDate(event_date) + if self.notification.proposed_decision_code: self.event.setExternalDecision(self.notification.proposed_decision_code) diff --git a/src/Products/urban/notice/notification.py b/src/Products/urban/notice/notification.py index 6ecc1c667..ee902eb2e 100644 --- a/src/Products/urban/notice/notification.py +++ b/src/Products/urban/notice/notification.py @@ -241,6 +241,13 @@ def send_date(self): raw_date = self._get_data("sendDate") if raw_date: return datetime.strptime(raw_date[:19], "%Y-%m-%dT%H:%M:%S").date() + + @property + def due_date(self): + """Return the due date""" + raw_date = self._get_data("dueDate") + if raw_date: + return datetime.strptime(raw_date[:19], "%Y-%m-%dT%H:%M:%S").date() @property def container(self):