[Mpuls-commits] r4923 - in jmd/trunk: . jmdstrukturweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Apr 20 10:44:38 CEST 2011


Author: roland
Date: 2011-04-20 10:44:37 +0200 (Wed, 20 Apr 2011)
New Revision: 4923

Modified:
   jmd/trunk/ChangeLog
   jmd/trunk/Changes
   jmd/trunk/jmdstrukturweb/model/case.py
Log:
issue1990: number of users can't be calculated with current formed

Modified: jmd/trunk/ChangeLog
===================================================================
--- jmd/trunk/ChangeLog	2011-04-19 14:20:32 UTC (rev 4922)
+++ jmd/trunk/ChangeLog	2011-04-20 08:44:37 UTC (rev 4923)
@@ -1,3 +1,8 @@
+2011-04-20  Roland Geider  <roland.geider at intevation.de>
+
+	* jmdstrukturweb/model/case.py: issue1990: number of users can't be
+	  calculated with current formed. See issue for details.
+
 2011-04-19  Roland Geider  <roland.geider at intevation.de>
 
 	* jmdweb/public/xml/eval_zielgruppe.xml: issue2062: use correct ID for checking

Modified: jmd/trunk/Changes
===================================================================
--- jmd/trunk/Changes	2011-04-19 14:20:32 UTC (rev 4922)
+++ jmd/trunk/Changes	2011-04-20 08:44:37 UTC (rev 4923)
@@ -14,10 +14,6 @@
           Die Übersicht der Kooperationsbezüge wurde um die Angabe "Bennenung der
           Kooperationspartner/innen" erweitert
     
-        * Issue1990: Automatische Ermittlung der Anzahl der MA
-          Beim Anlegen neuer Statistiken werden automatisch die Anzahl der Mitarbeiter
-          vorausgefüllt.
-    
         * Issue1995: Angaben zur Bildungsberatung - Pflichtfelder
           Die Folgenden Felder sind nun aus Pflichtfelder markiert:
           - Bildungsberatung Garantiefonds Hochschule (vorhanden/nicht vorhanden)

Modified: jmd/trunk/jmdstrukturweb/model/case.py
===================================================================
--- jmd/trunk/jmdstrukturweb/model/case.py	2011-04-19 14:20:32 UTC (rev 4922)
+++ jmd/trunk/jmdstrukturweb/model/case.py	2011-04-20 08:44:37 UTC (rev 4923)
@@ -37,18 +37,9 @@
 from mpulsweb.model.case import MpulsCase, MpulsCaseFactory, \
      MpulsCaseOverview, MpulsCaseBundle, MpulsCaseState
 
-from jmdstrukturweb.model.struktur import get_db
-
 log = logging.getLogger(__name__)
 
-# SQL STATEMENTS
-INIT_CASE_SQL = """
-UPDATE master_tbl_view
-SET
-    anzahl_ha_personen = %(anzahl)s
-WHERE id = %(id)s"""
 
-
 class CaseBundle(MpulsCaseBundle):
     pass
 
@@ -63,34 +54,8 @@
 
 class CaseFactory(MpulsCaseFactory):
     def _initNewCase(self, id):
-        """
-        Initialise the case with the number of users in the case part
-        Here we only count users with the role "cm"
-        """
-        case_db = get_db()
-        connection = cursor = None
-        try:
-            # Read the amount of users in the case part that are CM
-            connection = case_db.getConnection()
-            cursor = connection.cursor()
-            cursor.execute("SELECT COUNT(id) FROM ka_benutzer_tbl_view WHERE rolle LIKE '%cm'")
-            anzahl = cursor.fetchone()
-            
-            # Initialise the new statistic
-            user = session['USER_AUTHORIZED']
-            fields = {
-                'anzahl': anzahl[0],
-                'id': int(id)
-                }
-            conn = db.getConnection()
-            cur = conn.cursor()
-            cur.execute(INIT_CASE_SQL, fields)
-            conn.commit()
-        finally:
-            case_db.recycleConnection(connection, cursor)
-        
+        pass
 
-
 class Case(MpulsCase):
     pass
 



More information about the Mpuls-commits mailing list