Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/URB-3659.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add due date to imported summary report events
[daggelpop]
5 changes: 5 additions & 0 deletions src/Products/urban/browser/cron/notice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 7 additions & 0 deletions src/Products/urban/notice/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down