[Mpuls-commits] r251 - in wasko/trunk/waskaweb: controllers model templates/start

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Feb 10 11:28:20 CET 2009


Author: torsten
Date: 2009-02-10 11:28:19 +0100 (Tue, 10 Feb 2009)
New Revision: 251

Modified:
   wasko/trunk/waskaweb/controllers/waska.py
   wasko/trunk/waskaweb/model/appointment.py
   wasko/trunk/waskaweb/templates/start/start.mako
Log:
Disabled inconsistency checks and search for old cases (temporarily)


Modified: wasko/trunk/waskaweb/controllers/waska.py
===================================================================
--- wasko/trunk/waskaweb/controllers/waska.py	2009-02-09 13:33:54 UTC (rev 250)
+++ wasko/trunk/waskaweb/controllers/waska.py	2009-02-10 10:28:19 UTC (rev 251)
@@ -67,15 +67,15 @@
         else:
             # Get list of cases which were not edited longer than the allowed max
             # savetime
-            maxsavetimelist   = MaxSaveTimeReminderOverview()
-            caseremindlist        = CaseReminderOverview()
+            #maxsavetimelist   = MaxSaveTimeReminderOverview()
+            #caseremindlist        = CaseReminderOverview()
             #if h.hasRole(['cm_ka']):
             #    remindlist.join(maxsavetimelist)
             #    remindlist.sort()
             #    c.remindlist  = remindlist
             #else:
             #    c.remindlist  = maxsavetimelist 
-            c.remindlist  = maxsavetimelist 
+            #c.remindlist  = maxsavetimelist 
             # Load case and global appointments
             caseapp           = CaseAppointmentOverview()
             globalapp         = GlobalAppointmentOverview()
@@ -89,17 +89,18 @@
 
             #find out if there are cases with errors
             #Search inconsistencys on dates
-            search_str1 = "state:1;state:2;state:4;state:5;bad:1;bad:2;bad:3;bad:4;bad:5;bad:6;bad:7;own:%s" % user.id
+            #search_str1 = "state:1;state:2;state:4;state:5;bad:1;bad:2;bad:3;bad:4;bad:5;bad:6;bad:7;own:%s" % user.id
             #Search inconsistencys on phases but ignore older cases. 
-            search_str2 = "state:1;state:2;state:4;bad:clearing_start;bad:clearing_ende;bad:beratung_start;bad:beratung_ende;bad:cm_start;bad:cm_ende;bad:nachbetreuung_start;bad:nachbetreuung_ende;only_cases_after:'%s';own:%s" % (INCONSISTENCY_CHECK_AFTER, user.id)
-            error_cases1 = Set(c.id for c in CaseOverview().search(search_str1))
-            error_cases2 = Set(c.id for c in CaseOverview().search(search_str2))
-            c.num_error_cases = len(error_cases1.union(error_cases2))
+            #search_str2 = "state:1;state:2;state:4;bad:clearing_start;bad:clearing_ende;bad:beratung_start;bad:beratung_ende;bad:cm_start;bad:cm_ende;bad:nachbetreuung_start;bad:nachbetreuung_ende;only_cases_after:'%s';own:%s" % (INCONSISTENCY_CHECK_AFTER, user.id)
+            #error_cases1 = Set(c.id for c in CaseOverview().search(search_str1))
+            #error_cases2 = Set(c.id for c in CaseOverview().search(search_str2))
+            #c.num_error_cases = len(error_cases1.union(error_cases2))
 
-            if c.num_error_cases > 0:
-                session['hascaseerrors'] = True
-            else:
-                session['hascaseerrors'] = False
+            #if c.num_error_cases > 0:
+            #    session['hascaseerrors'] = True
+            #else:
+            #    session['hascaseerrors'] = False
+            session['hascaseerrors'] = False
             session.save()
 
         # LOAD NEWS

Modified: wasko/trunk/waskaweb/model/appointment.py
===================================================================
--- wasko/trunk/waskaweb/model/appointment.py	2009-02-09 13:33:54 UTC (rev 250)
+++ wasko/trunk/waskaweb/model/appointment.py	2009-02-10 10:28:19 UTC (rev 251)
@@ -77,7 +77,7 @@
 #WHERE s.status <> 5 
 #AND extract(day from now()-getLastCaseAppointment(m.id)) > %(maxdays)s 
 #AND m.zeitraum_nachbetreuung = -1 
-#AND m.art_beendigung <> 1"""
+#AND m.cm_end_art <> 1"""
 
 GET_OLDACTIVE_CASES_4_ADMIN = """
 SELECT m.id, s.zugriff, getLastCaseAppointment(m.id) AS last_date
@@ -85,9 +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.zeitraum_nachbetreuung = -1
-       AND m.art_beendigung <> 1 
-       AND getLastCaseAppointment(s.master_id) < now() - interval '1 day' * %(maxdays)s
+   WHERE m.cm_end_art <> 1
 """
 GET_OLDACTIVE_CASES = """
 SELECT m.id, s.zugriff, getLastCaseAppointment(m.id) AS last_date
@@ -95,10 +93,8 @@
   (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.zeitraum_nachbetreuung = -1
-       AND m.art_beendigung <> 1 
+   WHERE m.cm_end_art <> 1 
        AND m.bearbeiter_id = %(editor)s
-       AND getLastCaseAppointment(s.master_id) < now() - interval '1 day' * %(maxdays)s
 """
 
 GET_OLDFINISHED_CASES_4_ADMIN = """SELECT m.id, s.zugriff, 
@@ -108,8 +104,7 @@
 ON s.master_id = m.id 
 WHERE s.status <> 5
 AND extract(day from now()-s.zugriff) > %(maxdays)s 
-AND (m.zeitraum_nachbetreuung <> -1 
-OR m.art_beendigung = 1)"""
+OR m.cm_end_art = 1)"""
 
 GET_OLDFINISHED_CASES = """SELECT m.id, s.zugriff, 
 getLastCaseAppointment(m.id) as last_date 
@@ -119,8 +114,7 @@
 WHERE s.status <> 5
 AND m.bearbeiter_id = %(editor)s
 AND extract(day from now()-s.zugriff) > %(maxdays)s 
-AND (m.zeitraum_nachbetreuung <> -1 
-OR m.art_beendigung = 1)"""
+OR m.cm_end_art = 1)"""
 
 #class AppointmentBundle:
 #    def __init__(self, ids):

Modified: wasko/trunk/waskaweb/templates/start/start.mako
===================================================================
--- wasko/trunk/waskaweb/templates/start/start.mako	2009-02-09 13:33:54 UTC (rev 250)
+++ wasko/trunk/waskaweb/templates/start/start.mako	2009-02-10 10:28:19 UTC (rev 251)
@@ -41,8 +41,8 @@
       <%include file="/start/newslist.mako"/>
     </div>
     % endif
-    <h2>Automatisierte Wiedervorlagen</h2>
-    <%include file="/start/remindlist.mako"/>
+    ## <h2>Automatisierte Wiedervorlagen</h2>
+    ## <%include file="/start/remindlist.mako"/>
     %if h.hasRole('cm_ka'):
       <h2>Eigene Termine</h2>
       <%include file="/start/appointmentlist.mako"/>



More information about the Mpuls-commits mailing list