[Mpuls-commits] r825 - in wasko/branches/2.0: . waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jan 22 11:53:40 CET 2010


Author: torsten
Date: 2010-01-22 11:53:37 +0100 (Fri, 22 Jan 2010)
New Revision: 825

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/waskaweb/lib/evaluation.py
Log:
* waskaweb/lib/evaluation.py (Evaluation._build_eval_where_clause): 
Deleted is not called from anywhere.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-01-22 10:47:32 UTC (rev 824)
+++ wasko/branches/2.0/ChangeLog	2010-01-22 10:53:37 UTC (rev 825)
@@ -1,5 +1,10 @@
 2010-01-22  Torsten Irländer <torsten.irlaender at intevation.com
 
+	* waskaweb/lib/evaluation.py (Evaluation._build_eval_where_clause):
+	  Deleted is not called from anywhere.
+
+2010-01-22  Torsten Irländer <torsten.irlaender at intevation.com
+
 	* waskaweb/controllers/case_overview.py: Removed import. Was not used 
 	* waskaweb/lib/search.py (build_inconsistency_type_querys): Removed.
 	  Was not used anyway.

Modified: wasko/branches/2.0/waskaweb/lib/evaluation.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/evaluation.py	2010-01-22 10:47:32 UTC (rev 824)
+++ wasko/branches/2.0/waskaweb/lib/evaluation.py	2010-01-22 10:53:37 UTC (rev 825)
@@ -90,42 +90,6 @@
     def where_clause(self, ids, field="id"):
         return "(%s)" % where_ids(ids, field)
 
-    def _build_eval_where_clause(self, fkz):
-        '''Only for evaluation server. Builds where-clause based on fkz'''
-        fkz = "fkz IN (%s)" % (", ".join("'%s'" % a.fkz for a in session.get('agencybundle', AgencyBundle()).getAgencys()))
-        dummy_search = AgencySearch()
-        form_defaults = session.get('CASE_OVERVIEW_SEARCHOPTIONS') or {}
-        search_options = parseSearchOptions(form_defaults)
-        search_str = ";".join(search_options)
-        search, options, states, bad_types, phaseslist, fields = dummy_search._parse_search_str(search_str)
-
-        gender = options.get('gender') and "m.geschlecht = %s" % options.get('gender') or "TRUE"
-
-        #Phases
-        phases = 'TRUE' #default
-        if phaseslist:
-            phases = 'm.id in (SELECT id from master_tbl_eval_total_view WHERE phase in (%s))' % ','.join([str(p) for p in phaseslist])
-
-        time_interval = "TRUE"
-        interval_start_field = options.get('interval_start_field', "erstgespraech")
-        interval_end_field = options.get('interval_end_field', "beendigung_5")
-        interval_start_date = options.get('interval_start_date',"1970-01-01")
-        d = datetime.today()
-        interval_end_date = options.get('interval_end_date', d.strftime('%Y-%m-%d'))
-        fields = {'start_field': interval_start_field, 'start_date': interval_start_date, 'end_field': interval_end_field, 'end_date': interval_end_date} 
-        if interval_start_date != '1970-01-01':
-            time_interval = "(coalesce(%(start_field)s, '1970-01-01')::date <= '%(end_date)s'::date \
-            AND (coalesce(%(end_field)s, now()) >= '%(start_date)s'::date))" % fields
-
-            #time_interval = "(coalesce(%(start_field)s, '1970-01-01'::date) <= '%(end_date)s'::date AND \
-            #coalesce(%(start_field)s, '1970-01-01'::date) <= coalesce(%(end_field)s, st.zugriff) AND \
-            #((m.id in (SELECT id from master_tbl_incm_view) AND \
-            #(coalesce(%(end_field)s, now()) >= '%(start_date)s'::date)) OR \
-            #(st.zugriff >= '%(start_date)s'::date)))" % fields
-
-        where = " AND ".join([fkz, '%s ' % gender, '%s ' % phases, '%s ' % time_interval])
-        return where
-
     def perform(self):
         '''overwrite this to do the calculation'''
         pass



More information about the Mpuls-commits mailing list