From: richard Date: Tue, 10 Dec 2002 00:46:55 +0000 (+0000) Subject: - finished of handling of retired flag in filter() (sf bug 635260) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b807098ed1cccee8ba35a60d28cd6440eccba553;p=roundup.git - finished of handling of retired flag in filter() (sf bug 635260) [bugfix in mailgw unit tests for x-roundup-loop too] git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1396 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index 3e0552d..17d3e39 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,7 @@ are given with the most recent entry first. - reverse message listing in issue display (reversion of recent change) - bad entries for multilink editing in cgi don't traceback now (sf bug 640310) - detect and break email loops (sf bug 640854) +- finished of handling of retired flag in filter() (sf bug 635260) 2002-11-07 0.5.2 diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index 35bc234..c2e1594 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -971,7 +971,11 @@ class LinkHTMLProperty(HTMLProperty): else: s = '' l.append(_('')%s) - # XXX if the current value is retired, then list it explicitly + + # make sure we list the current value if it's retired + if self._value and self._value not in options: + options.insert(0, self._value) + for optionid in options: # get the option value, and if it's None use an empty string option = linkcl.get(optionid, k) or '' @@ -1018,7 +1022,11 @@ class LinkHTMLProperty(HTMLProperty): else: sort_on = ('+', linkcl.labelprop()) options = linkcl.filter(None, conditions, sort_on, (None, None)) - # XXX if the current value is retired, then list it explicitly + + # make sure we list the current value if it's retired + if self._value and self._value not in options: + options.insert(0, self._value) + for optionid in options: # get the option value, and if it's None use an empty string option = linkcl.get(optionid, k) or '' @@ -1139,7 +1147,12 @@ class MultilinkHTMLProperty(HTMLProperty): height = height or min(len(options), 7) l = ['