[Mpuls-commits] r4736 - base/trunk/mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Mar 1 16:29:10 CET 2011


Author: torsten
Date: 2011-03-01 16:29:09 +0100 (Tue, 01 Mar 2011)
New Revision: 4736

Modified:
   base/trunk/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MpulsCase.getSubject): Issue1874: Added new
	function which returns a short string to identify the case.


Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py	2011-03-01 14:00:01 UTC (rev 4735)
+++ base/trunk/mpulsweb/model/case.py	2011-03-01 15:29:09 UTC (rev 4736)
@@ -870,6 +870,15 @@
         self.formed_instance.setData(data)
         self.formed_instance.commit()
 
+    def getSubject(self, fieldnames=None):
+        """Returns a short string identifier for the case built from info fields."""
+        values = []
+        for f in self.get_infofield_fields():
+            x = self.get_value(f.name)
+            if x:
+                values.append(str(x))
+        return ", ".join(values) 
+
     def getPhase(self):
         return self.getState().getPhase()
 



More information about the Mpuls-commits mailing list