From 8ed3d404b9731621572f5dc2ee4f1789abcd7537 Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 12 Aug 2003 02:22:22 +0000 Subject: [PATCH] don't have RDBMS backends list retired nodes (sf bug 767319) git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1808 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 1 + roundup/backends/rdbms_common.py | 7 +++++-- test/test_db.py | 7 ++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index b644e91..dceadb3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ are given with the most recent entry first. - timelog editing via csv interface crashes (sf bug 699837) - sort multilinks a little better for grouping (sf bug 772935) - batch the (list) listings at 500 entries per page (sf bug 759906) +- don't have RDBMS backends list retired nodes (sf bug 767319) 2003-07-29 0.6.0b4 diff --git a/roundup/backends/rdbms_common.py b/roundup/backends/rdbms_common.py index 9d7f333..a6e268d 100644 --- a/roundup/backends/rdbms_common.py +++ b/roundup/backends/rdbms_common.py @@ -1,4 +1,4 @@ -# $Id: rdbms_common.py,v 1.57 2003-07-03 23:43:46 richard Exp $ +# $Id: rdbms_common.py,v 1.58 2003-08-12 02:18:46 richard Exp $ ''' Relational database (SQL) backend common code. Basics: @@ -1479,7 +1479,7 @@ class Class(hyperdb.Class): self.fireReactors('retire', nodeid, None) def restore(self, nodeid): - '''Restpre a retired node. + '''Restore a retired node. Make node available for all operations like it was before retirement. ''' @@ -1891,6 +1891,9 @@ class Class(hyperdb.Class): where.append('_%s=%s'%(k, a)) args.append(v) + # don't match retired nodes + where.append('__retired__ <> 1') + # add results of full text search if search_matches is not None: v = search_matches.keys() diff --git a/test/test_db.py b/test/test_db.py index 0aa53fd..2994213 100644 --- a/test/test_db.py +++ b/test/test_db.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: test_db.py,v 1.89 2003-05-09 01:47:51 richard Exp $ +# $Id: test_db.py,v 1.90 2003-08-12 02:22:22 richard Exp $ import unittest, os, shutil, time @@ -684,6 +684,11 @@ class anydbmDBTestCase(MyTestCase): ae, filt = self.filteringSetup() ae(filt(None, {'status': '1'}, ('+','id'), (None,None)), ['2','3']) + def testFilteringRetired(self): + ae, filt = self.filteringSetup() + self.db.issue.retire('2') + ae(filt(None, {'status': '1'}, ('+','id'), (None,None)), ['3']) + def testFilteringMultilink(self): ae, filt = self.filteringSetup() ae(filt(None, {'nosy': '2'}, ('+','id'), (None,None)), ['3']) -- 2.30.2