[Mpuls-commits] r272 - in wasko/trunk: . waskaweb/lib waskaweb/templates/casemanagement

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Feb 19 16:00:49 CET 2009


Author: torsten
Date: 2009-02-19 16:00:48 +0100 (Thu, 19 Feb 2009)
New Revision: 272

Modified:
   wasko/trunk/ChangeLog.txt
   wasko/trunk/waskaweb/lib/evaluation_new.py
   wasko/trunk/waskaweb/lib/search.py
   wasko/trunk/waskaweb/templates/casemanagement/search.mako
Log:
Migrated search from WASKA


Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt	2009-02-19 12:02:05 UTC (rev 271)
+++ wasko/trunk/ChangeLog.txt	2009-02-19 15:00:48 UTC (rev 272)
@@ -42,7 +42,16 @@
 	* waskaweb/controllers/CaseBase.py,
 	  waskaweb/controllers/case.py: Removed special code.
 
+	Migrated search from WASKA
 
+	* waskaweb/lib/search.py,
+	  waskaweb/templates/casemanagement/search.mako: Changed some
+	  fieldnames
+
+	* waskaweb/lib/evaluation_new.py: flipped index of men and women as it
+	  differs from WASKA
+
+
 2009-02-17	Torsten Irlaender  <torsten.irlaender at intevation.de>
 
 	Use Widgetcollector from offlineclient

Modified: wasko/trunk/waskaweb/lib/evaluation_new.py
===================================================================
--- wasko/trunk/waskaweb/lib/evaluation_new.py	2009-02-19 12:02:05 UTC (rev 271)
+++ wasko/trunk/waskaweb/lib/evaluation_new.py	2009-02-19 15:00:48 UTC (rev 272)
@@ -295,9 +295,10 @@
             #log.debug(cur.query)
             for r in cur.fetchall():
                 self.result[r[0]] = r[1]
-                if r[0] == 1: # men
+                # !!! Index of gender differs to WASKA  !!! 
+                if r[0] == 0: # men
                     self.men = int(r[1])
-                if r[0] == 0: # women
+                if r[0] == 1: # women
                     self.women = int(r[1])
         except StandardError, err:
             #log.error(err)

Modified: wasko/trunk/waskaweb/lib/search.py
===================================================================
--- wasko/trunk/waskaweb/lib/search.py	2009-02-19 12:02:05 UTC (rev 271)
+++ wasko/trunk/waskaweb/lib/search.py	2009-02-19 15:00:48 UTC (rev 272)
@@ -104,10 +104,10 @@
     # the phases
     querys = {'1': 'm.erstgespraech is NULL', 
               '2': 'm.erstgespraech::timestamp > now()',
-              '3': 'm.erstgespraech::timestamp > m.beendigung_5::timestamp',
-              '4': 'm.beendigung_5::timestamp > now()',
-              '5': '(m.art_beendigung <> -1 AND m.beendigung_5 is NULL)',
-              '6': '(m.art_beendigung = -1 AND m.beendigung_5 is not NULL)',
+              '3': 'm.erstgespraech::timestamp > m.datum_cm_ende::timestamp',
+              '4': 'm.datum_cm_ende::timestamp > now()',
+              '5': '(m.cm_end_art <> -1 AND m.datum_cm_ende is NULL)',
+              '6': '(m.cm_end_art = -1 AND m.datum_cm_ende is not NULL)',
               '7': '(m.phase = -1)'}
 
     #Now fetch more inconsistencys based on phases
@@ -198,7 +198,7 @@
 
         time_interval = "TRUE"
         interval_start_field = options.get('interval_start_field', "erstgespraech")
-        interval_end_field = options.get('interval_end_field', "beendigung_5")
+        interval_end_field = options.get('interval_end_field', "datum_cm_ende")
         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'))
@@ -280,7 +280,7 @@
         time_interval = "TRUE"
         if options.get('interval_start_date') and options.get('interval_end_date'):
             interval_start_field = options.get('interval_start_field', "erstgespraech")
-            interval_end_field = options.get('interval_end_field', "beendigung_5")
+            interval_end_field = options.get('interval_end_field', "datum_cm_ende")
             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'))

Modified: wasko/trunk/waskaweb/templates/casemanagement/search.mako
===================================================================
--- wasko/trunk/waskaweb/templates/casemanagement/search.mako	2009-02-19 12:02:05 UTC (rev 271)
+++ wasko/trunk/waskaweb/templates/casemanagement/search.mako	2009-02-19 15:00:48 UTC (rev 272)
@@ -66,9 +66,8 @@
         <td valign="top">
           <select name="gender" id="gender">
             <option value="-2">Alle</option>
-            <option value="0">Weiblich</option>
-            <option value="1">Männlich</option>
-            <option value="2">Intersexuell</option>
+            <option value="1">Weiblich</option>
+            <option value="0">Männlich</option>
             <option value="-1">Kein Angabe</option>
           </select>
         </td>



More information about the Mpuls-commits mailing list