summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9f34369)
raw | patch | inline | side by side (parent: 9f34369)
author | kedder <kedder@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 3 Feb 2003 11:14:16 +0000 (11:14 +0000) | ||
committer | kedder <kedder@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 3 Feb 2003 11:14:16 +0000 (11:14 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1486 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
roundup/backends/back_anydbm.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index b46ed5e1b9edf2e3d0388192cd401e9fa67cbfe8..07990c7704ec1c658c9eae4a1001a553a698f445 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
convered to GMT (see doc/upgrading.txt).
- added a form to show a specific issue
- fixed layout issues with forms in sidebar
-
+- more proper sorting/grouping on mulitilink properties. Sorting is performed
+ not only by number of links, but also by links itself. This makes usable
+ grouping e.g. by topic multilink
2003-??-?? 0.5.5
- fixed rdbms searching by ID (sf bug 666615)
index 37c65b309e6df85598db46c18dd731c8e615b5e4..c106f2f2292a715e5dc5b0f9688a54402956bd2a 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: back_anydbm.py,v 1.98 2003-01-21 23:44:27 richard Exp $
+#$Id: back_anydbm.py,v 1.99 2003-02-03 11:14:16 kedder 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
# Multilink properties are sorted according to how many
# links are present.
elif isinstance(propclass, Multilink):
+ r = cmp(len(av), len(bv))
+ if r == 0:
+ # Compare contents of multilink property if lenghts is
+ # equal
+ r = cmp ('.'.join(av), '.'.join(bv))
if dir == '+':
- r = cmp(len(av), len(bv))
- if r != 0: return r
+ return r
elif dir == '-':
- r = cmp(len(bv), len(av))
- if r != 0: return r
+ return -r
elif isinstance(propclass, Number) or isinstance(propclass, Boolean):
if dir == '+':
r = cmp(av, bv)