incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1301318 - /incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/model.py
Date Fri, 16 Mar 2012 02:55:22 GMT
Author: gjm
Date: Fri Mar 16 02:55:22 2012
New Revision: 1301318

URL: http://svn.apache.org/viewvc?rev=1301318&view=rev
Log:
trigger ticket system to update fields on all multiproduct model inserts/updates/deletes

Modified:
    incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/model.py

Modified: incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/model.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/model.py?rev=1301318&r1=1301317&r2=1301318&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/model.py (original)
+++ incubator/bloodhound/trunk/bloodhound_multiproduct/multiproduct/model.py Fri Mar 16 02:55:22
2012
@@ -24,6 +24,7 @@ from trac.db import Table, Column, Datab
 from trac.env import IEnvironmentSetupParticipant
 from trac.web.chrome import ITemplateProvider
 from trac.resource import Resource
+from trac.ticket.api import TicketSystem
 
 DB_VERSION = 1
 DB_SYSTEM_KEY = 'bloodhound_multi_product_version'
@@ -141,6 +142,7 @@ class ModelBase(object):
             self._exists = False
             self._data = dict([(k, None) for k in self._data.keys()])
             self._old_data.update(self._data)
+            TicketSystem(self._env).reset_ticket_fields()
     
     def insert(self):
         """Create new record in the database"""
@@ -170,6 +172,7 @@ class ModelBase(object):
             db(sql, [self._data[f] for f in fields])
             self._exists = True
             self._old_data.update(self._data)
+            TicketSystem(self._env).reset_ticket_fields()
 
     def update(self):
         """Update the matching record in the database"""
@@ -191,6 +194,7 @@ class ModelBase(object):
         with self._env.db_transaction as db:
             db(sql, setvalues + values)
             self._old_data.update(self._data)
+            TicketSystem(self._env).reset_ticket_fields()
     
     @classmethod
     def select(cls, env, db=None, where=None):



Mime
View raw message