summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: be8f07f)
raw | patch | inline | side by side (parent: be8f07f)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 10 Dec 2002 00:46:55 +0000 (00:46 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 10 Dec 2002 00:46:55 +0000 (00:46 +0000) |
[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
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1396 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
roundup/cgi/templating.py | patch | blob | history | |
test/test_mailgw.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index 3e0552d56595b4711e8d84f031bc10b153b1821f..17d3e390b26097de8022b9d1e13df843c3ce5128 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
- 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
index 35bc234b290eb86615a6dcc2b526c9f65bc3b8c0..c2e15940578a1a4ec60e9b4665b760d1e3300050 100644 (file)
else:
s = ''
l.append(_('<option %svalue="-1">- no selection -</option>')%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 ''
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 ''
height = height or min(len(options), 7)
l = ['<select multiple name="%s" size="%s">'%(self._name, height)]
k = linkcl.labelprop(1)
- # XXX if any of the current values are retired, then list them
+
+ # make sure we list the current values if they're retired
+ for value in self._value:
+ if value not in options:
+ options.insert(0, value)
+
for optionid in options:
# get the option value, and if it's None use an empty string
option = linkcl.get(optionid, k) or ''
diff --git a/test/test_mailgw.py b/test/test_mailgw.py
index 918f431396773b0077205e62d9b2b63796714d64..469b4cfbafb2f34b7ac4742b5f60ec8b437050f2 100644 (file)
--- a/test/test_mailgw.py
+++ b/test/test_mailgw.py
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: test_mailgw.py,v 1.34 2002-12-10 00:11:16 richard Exp $
+# $Id: test_mailgw.py,v 1.35 2002-12-10 00:46:55 richard Exp $
import unittest, cStringIO, tempfile, os, shutil, errno, imp, sys, difflib
@@ -211,6 +211,7 @@ Reply-To: Roundup issue tracker <issue_tracker@your.tracker.email.domain.example
MIME-Version: 1.0
Message-Id: <dummy_test_message_id>
X-Roundup-Name: Roundup issue tracker
+X-Roundup-Loop: hello
Content-Transfer-Encoding: quoted-printable
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
X-Roundup-Name: Roundup issue tracker
+X-Roundup-Loop: hello
Content-Transfer-Encoding: quoted-printable
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
X-Roundup-Name: Roundup issue tracker
+X-Roundup-Loop: hello
Content-Transfer-Encoding: quoted-printable
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
X-Roundup-Name: Roundup issue tracker
+X-Roundup-Loop: hello
Content-Transfer-Encoding: quoted-printable
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
X-Roundup-Name: Roundup issue tracker
+X-Roundup-Loop: hello
Content-Transfer-Encoding: quoted-printable
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
X-Roundup-Name: Roundup issue tracker
+X-Roundup-Loop: hello
Content-Transfer-Encoding: quoted-printable
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
X-Roundup-Name: Roundup issue tracker
+X-Roundup-Loop: hello
Content-Transfer-Encoding: quoted-printable
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
X-Roundup-Name: Roundup issue tracker
+X-Roundup-Loop: hello
Content-Transfer-Encoding: quoted-printable
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
X-Roundup-Name: Roundup issue tracker
+X-Roundup-Loop: hello
Content-Transfer-Encoding: quoted-printable
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
X-Roundup-Name: Roundup issue tracker
+X-Roundup-Loop: hello
Content-Transfer-Encoding: quoted-printable
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
X-Roundup-Name: Roundup issue tracker
+X-Roundup-Loop: hello
Content-Transfer-Encoding: quoted-printable
Message-Id: <followup_dummy_id>
In-Reply-To: <dummy_test_message_id>
X-Roundup-Name: Roundup issue tracker
+X-Roundup-Loop: hello
Content-Transfer-Encoding: quoted-printable