diff doc/customizing.txt @ 3259:f3e82dc57c7e maint-0.8

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Tue, 05 Apr 2005 01:13:00 +0000
parents 09fbb09bddd4
children 62d58c72621b
line wrap: on
line diff
--- a/doc/customizing.txt	Mon Apr 04 08:47:14 2005 +0000
+++ b/doc/customizing.txt	Tue Apr 05 01:13:00 2005 +0000
@@ -2,7 +2,7 @@
 Customising Roundup
 ===================
 
-:Version: $Revision: 1.161.2.10 $
+:Version: $Revision: 1.161.2.11 $
 
 .. This document borrows from the ZopeBook section on ZPT. The original is at:
    http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -3689,6 +3689,7 @@
 
    The contents of the detector should be something like this::
 
+
     def blockresolution(db, cl, nodeid, newvalues):
         ''' If the issue has blockers, don't allow it to be resolved.
         '''
@@ -3719,18 +3720,21 @@
         if newvalues['status'] == resolved_id:
             raise ValueError, "This issue can't be resolved until %s resolved."%s
 
-    def resolveblockers(db, cl, nodeid, newvalues):
+
+    def resolveblockers(db, cl, nodeid, oldvalues):
         ''' When we resolve an issue that's a blocker, remove it from the
             blockers list of the issue(s) it blocks.
         '''
-        if not newvalues.has_key('status'):
+        newstatus = cl.get(nodeid,'status')
+
+        # no change?
+        if oldvalues.get('status', None) == newstatus:
             return
 
-        # get the resolved state ID
         resolved_id = db.status.lookup('resolved')
 
         # interesting?
-        if newvalues['status'] != resolved_id:
+        if newstatus != resolved_id:
             return
 
         # yes - find all the blocked issues, if any, and remove me from
@@ -3742,7 +3746,6 @@
                 blockers.remove(nodeid)
                 cl.set(issueid, blockers=blockers)
 
-
     def init(db):
         # might, in an obscure situation, happen in a create
         db.issue.audit('create', blockresolution)

Roundup Issue Tracker: http://roundup-tracker.org/