Skip to content

Commit ed8e2bc

Browse files
author
Richard Jones
committed
don't have RDBMS backends list retired nodes [SF#767319]
1 parent 3bd5241 commit ed8e2bc

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ are given with the most recent entry first.
99
- timelog editing via csv interface crashes (sf bug 699837)
1010
- sort multilinks a little better for grouping (sf bug 772935)
1111
- batch the (list) listings at 500 entries per page (sf bug 759906)
12+
- don't have RDBMS backends list retired nodes (sf bug 767319)
1213

1314

1415
2003-07-29 0.6.0b4

roundup/backends/rdbms_common.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: rdbms_common.py,v 1.57 2003-07-03 23:43:46 richard Exp $
1+
# $Id: rdbms_common.py,v 1.58 2003-08-12 02:18:46 richard Exp $
22
''' Relational database (SQL) backend common code.
33
44
Basics:
@@ -1479,7 +1479,7 @@ def retire(self, nodeid):
14791479
self.fireReactors('retire', nodeid, None)
14801480

14811481
def restore(self, nodeid):
1482-
'''Restpre a retired node.
1482+
'''Restore a retired node.
14831483
14841484
Make node available for all operations like it was before retirement.
14851485
'''
@@ -1891,6 +1891,9 @@ def filter(self, search_matches, filterspec, sort=(None,None),
18911891
where.append('_%s=%s'%(k, a))
18921892
args.append(v)
18931893

1894+
# don't match retired nodes
1895+
where.append('__retired__ <> 1')
1896+
18941897
# add results of full text search
18951898
if search_matches is not None:
18961899
v = search_matches.keys()

test/test_db.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: test_db.py,v 1.89 2003-05-09 01:47:51 richard Exp $
18+
# $Id: test_db.py,v 1.90 2003-08-12 02:22:22 richard Exp $
1919

2020
import unittest, os, shutil, time
2121

@@ -684,6 +684,11 @@ def testFilteringLink(self):
684684
ae, filt = self.filteringSetup()
685685
ae(filt(None, {'status': '1'}, ('+','id'), (None,None)), ['2','3'])
686686

687+
def testFilteringRetired(self):
688+
ae, filt = self.filteringSetup()
689+
self.db.issue.retire('2')
690+
ae(filt(None, {'status': '1'}, ('+','id'), (None,None)), ['3'])
691+
687692
def testFilteringMultilink(self):
688693
ae, filt = self.filteringSetup()
689694
ae(filt(None, {'nosy': '2'}, ('+','id'), (None,None)), ['3'])

0 commit comments

Comments
 (0)