[Mpuls-commits] r321 - in wasko/trunk: . waskaweb/controllers waskaweb/model waskaweb/templates/casemanagement
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Mar 3 16:55:04 CET 2009
Author: torsten
Date: 2009-03-03 16:55:00 +0100 (Tue, 03 Mar 2009)
New Revision: 321
Modified:
wasko/trunk/ChangeLog.txt
wasko/trunk/waskaweb/controllers/waska.py
wasko/trunk/waskaweb/model/appointment.py
wasko/trunk/waskaweb/model/case.py
wasko/trunk/waskaweb/templates/casemanagement/digest_body.mako
Log:
Reactivated checks for old cases.
Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt 2009-03-03 13:42:52 UTC (rev 320)
+++ wasko/trunk/ChangeLog.txt 2009-03-03 15:55:00 UTC (rev 321)
@@ -10,6 +10,15 @@
* waskaweb/controllers/case_overview.py: Changed labeling of phases in
search
+ Reactivated checks if a case is older than maxsavetime
+
+ * waskaweb/model/appointment.py,
+ waskaweb/model/case.py,
+ waskaweb/controllers/waska.py,
+ waskaweb/templates/casemanagement/digest_body.mako: Mainly
+ uncommented code and adopted checks if a case is finished to the
+ phases model
+
2009-03-03 Sascha L. Teichmann <teichmann at intevation.de>
Initial code to import XML documents. Parses the documents
Modified: wasko/trunk/waskaweb/controllers/waska.py
===================================================================
--- wasko/trunk/waskaweb/controllers/waska.py 2009-03-03 13:42:52 UTC (rev 320)
+++ wasko/trunk/waskaweb/controllers/waska.py 2009-03-03 15:55:00 UTC (rev 321)
@@ -67,22 +67,22 @@
else:
# Get list of cases which were not edited longer than the allowed max
# savetime
- #maxsavetimelist = MaxSaveTimeReminderOverview()
- #caseremindlist = CaseReminderOverview()
- #if h.hasRole(['cm_ka']):
- # remindlist.join(maxsavetimelist)
- # remindlist.sort()
- # c.remindlist = remindlist
- #else:
- # c.remindlist = maxsavetimelist
- #c.remindlist = maxsavetimelist
+ maxsavetimelist = MaxSaveTimeReminderOverview()
+ caseremindlist = CaseReminderOverview()
+ if h.hasRole(['cm_ka']):
+ caseremindlist.join(maxsavetimelist)
+ caseremindlist.sort()
+ c.remindlist = caseremindlist
+ else:
+ c.remindlist = maxsavetimelist
+ c.remindlist = maxsavetimelist
# Load case and global appointments
caseapp = CaseAppointmentOverview()
globalapp = GlobalAppointmentOverview()
# As we want to display both kind of app. we need to join the lists and
# sort them
if h.hasRole(['cm_ka']):
- #caseapp.join(caseremindlist)
+ caseapp.join(caseremindlist)
caseapp.sort()
c.appointmentlist = caseapp
c.globalappointmentlist = globalapp
Modified: wasko/trunk/waskaweb/model/appointment.py
===================================================================
--- wasko/trunk/waskaweb/model/appointment.py 2009-03-03 13:42:52 UTC (rev 320)
+++ wasko/trunk/waskaweb/model/appointment.py 2009-03-03 15:55:00 UTC (rev 321)
@@ -85,7 +85,7 @@
(SELECT * FROM ka_status_tbl_view
WHERE zugriff < now() - interval '1 day' * %(maxdays)s AND status <> 5) s
JOIN master_tbl_view m ON m.id = s.master_id
- WHERE m.cm_end_art <> 1
+ WHERE phase in (-1,0,1)
"""
GET_OLDACTIVE_CASES = """
SELECT m.id, s.zugriff, getLastCaseAppointment(m.id) AS last_date
@@ -93,7 +93,7 @@
(SELECT * FROM ka_status_tbl_view
WHERE zugriff < now() - interval '1 day' * %(maxdays)s AND status <> 5) s
JOIN master_tbl_view m ON m.id = s.master_id
- WHERE m.cm_end_art <> 1
+ WHERE phase in (-1,0,1)
AND m.bearbeiter_id = %(editor)s
"""
@@ -104,7 +104,7 @@
ON s.master_id = m.id
WHERE s.status <> 5
AND extract(day from now()-s.zugriff) > %(maxdays)s
-OR m.cm_end_art = 1)"""
+AND phase in (2,3,4)"""
GET_OLDFINISHED_CASES = """SELECT m.id, s.zugriff,
getLastCaseAppointment(m.id) as last_date
@@ -114,7 +114,7 @@
WHERE s.status <> 5
AND m.bearbeiter_id = %(editor)s
AND extract(day from now()-s.zugriff) > %(maxdays)s
-OR m.cm_end_art = 1)"""
+AND phase in (2,3,4)"""
#class AppointmentBundle:
# def __init__(self, ids):
Modified: wasko/trunk/waskaweb/model/case.py
===================================================================
--- wasko/trunk/waskaweb/model/case.py 2009-03-03 13:42:52 UTC (rev 320)
+++ wasko/trunk/waskaweb/model/case.py 2009-03-03 15:55:00 UTC (rev 321)
@@ -1095,8 +1095,6 @@
self.state = result.get('status')
self.access = result.get('zugriff')
self._last_date = result.get('letzer_termin')
- self.cm_finished = result.get('cm_beendet')
- self.cm_canceled = result.get('cm_abbruch')
self.phase = result.get('phase')
finally:
db.recycleConnection(conn, cur)
@@ -1117,10 +1115,10 @@
return self.state
def isCmFinished(self):
- return self.cm_finished != -1
+ return self.phase in (4, )
def isCmCanceled(self):
- return self.cm_canceled == 1
+ return self.phase in (2,3)
def setState(self, value):
conn, cur = None, None
Modified: wasko/trunk/waskaweb/templates/casemanagement/digest_body.mako
===================================================================
--- wasko/trunk/waskaweb/templates/casemanagement/digest_body.mako 2009-03-03 13:42:52 UTC (rev 320)
+++ wasko/trunk/waskaweb/templates/casemanagement/digest_body.mako 2009-03-03 15:55:00 UTC (rev 321)
@@ -21,7 +21,7 @@
% elif c.canceled:
<h1><img src="/images/alert.png" alt="achtung"/>Maximale Speicherdauer überschritten!</h1>
<p>
- Nach Abbruch des Case-Managements ist eine weitere Aufbewahrung der
+ Nach Beendigung des Case-Managements ist eine weitere Aufbewahrung der
personenbezogenen Daten der Fallakte nur bis zur maximalen Speicherdauer
zulässig. Die maximale Speicherdauer (${c.maxsavetime} Tage) wurde seit
${abs(c.daysToMaxSavetime)} Tagen überschritten! <strong>Es wird empfohlen,
More information about the Mpuls-commits
mailing list