From: richard Date: Wed, 6 Nov 2002 05:39:50 +0000 (+0000) Subject: - fixed filtering by id in anydbm X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0ba10aab13192d7143e0a5f9d123de69b1c919b4;p=roundup.git - fixed filtering by id in anydbm - show issue ID in the headings (sf bug 631598) git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1377 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index 3d8b95c..3f1ea6e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,8 @@ are given with the most recent entry first. - documented dependency on Active State (sf bug 623959) - ensured there's no zero-length files in source (sf bug 633622) - added ID to the search page (sf bug 631601) +- fixed filtering by id in anydbm +- show issue ID in the headings (sf bug 631598) 2002-10-16 0.5.1 diff --git a/roundup/backends/back_anydbm.py b/roundup/backends/back_anydbm.py index 13ba17a..bad6989 100644 --- a/roundup/backends/back_anydbm.py +++ b/roundup/backends/back_anydbm.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: back_anydbm.py,v 1.90 2002-10-31 04:03:48 richard Exp $ +#$Id: back_anydbm.py,v 1.91 2002-11-06 05:39:49 richard Exp $ ''' This module defines a backend that saves the hyperdatabase in a database chosen by anydbm. It is guaranteed to always be available in python @@ -1591,7 +1591,7 @@ class Class(hyperdb.Class): k, entry, self.properties[k].classname) u.append(entry) l.append((MULTILINK, k, u)) - elif isinstance(propclass, String): + elif isinstance(propclass, String) and k != 'id': # simple glob searching v = re.sub(r'([\|\{\}\\\.\+\[\]\(\)])', r'\\\1', v) v = v.replace('?', '.') @@ -1612,6 +1612,7 @@ class Class(hyperdb.Class): # now, find all the nodes that are active and pass filtering l = [] cldb = self.db.getclassdb(cn) + print filterspec try: # TODO: only full-scan once (use items()) for nodeid in self.db.getnodeids(cn, cldb): @@ -1620,6 +1621,10 @@ class Class(hyperdb.Class): continue # apply filter for t, k, v in filterspec: + # handle the id prop + if k == 'id' and v == nodeid: + continue + # make sure the node has the property if not node.has_key(k): # this node doesn't have this property, so reject it diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py index 10fd448..6f598c7 100644 --- a/roundup/cgi/client.py +++ b/roundup/cgi/client.py @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.55 2002-10-18 03:34:58 richard Exp $ +# $Id: client.py,v 1.56 2002-11-06 05:39:50 richard Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -1189,8 +1189,6 @@ def parsePropsFromForm(db, cl, form, nodeid=0, num_re=re.compile('^\d+$')): # of MiniFieldStorages. value = form[key] - print (mlaction, propname, value) - # make sure non-multilinks only get one value if not isinstance(proptype, hyperdb.Multilink): if isinstance(value, type([])): diff --git a/roundup/templates/classic/html/issue.item b/roundup/templates/classic/html/issue.item index 2094185..6afb146 100644 --- a/roundup/templates/classic/html/issue.item +++ b/roundup/templates/classic/html/issue.item @@ -1,7 +1,12 @@ -Issue editing -

Issue Editing

+ + Issue<span tal:replace="context/id" /> editing + + +

+ Issue Editing +

diff --git a/roundup/templates/classic/html/issue.search b/roundup/templates/classic/html/issue.search index fb720f0..da34b9b 100644 --- a/roundup/templates/classic/html/issue.search +++ b/roundup/templates/classic/html/issue.search @@ -58,8 +58,8 @@ ID: - - + +