Issue 1424550
Created on 2006-02-05 14:47 by dlinke, last changed 2006-03-03 07:41 by dlinke.
File name |
Uploaded |
Description |
Edit |
Remove |
indexError.htm
|
dlinke,
2006-02-05 14:47
|
|
|
|
sf1424550.patch
|
dlinke,
2006-02-11 15:08
|
patch for cvs-version |
|
|
msg2134 |
Author: [hidden] (dlinke) |
Date: 2006-02-05 14:47 |
|
How to reproduce (with roundup 1.0.1, tried for both
sqlite and anydbm):
1. start demo
2. add a new status 1234
3. create an issue with status set to 1234
4. Try to copy the issue
-> you will get an index error (see attached traceback)
The error will disappear if you rename status "1234" to
"1234a" or any other string that cannnot be converted
to integer.
I found this in our customized tracker where we have
project names that are numbers most of the time (but
not always so that they are stored as string).
David
|
msg2135 |
Author: [hidden] (dlinke) |
Date: 2006-02-11 15:08 |
|
Logged In: YES
user_id=734219
Attached is a patch that seems to solve this issue (verified
for demo-tracker. Please review!
The error seems to come from
roundup.cgi.templating.lookupIds(). Raising and catching an
error for nearly every entry is not very clever. Maybe there
is a better way for solving this problem.
|
msg2136 |
Author: [hidden] (dlinke) |
Date: 2006-02-12 16:53 |
|
Logged In: YES
user_id=734219
FYI - My patch breaks a test :(
Revisiting the code I do not think that the problem can be
solved easily at all. Lookup by key or id can never be
compatible if a string containing an integer number is used
as key and the id is also a string.
Since this issue is set to resolved I am curious about the
solution in the code.
|
msg2137 |
Author: [hidden] (dlinke) |
Date: 2006-02-12 21:30 |
|
Logged In: YES
user_id=734219
While the solution checked in solves the problem it causes a
test failure (just like my patch). Thus I've set status back
to "open".
======================================================================
FAIL: test_lookupIds (test.test_templating.FunctionsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python24\lib\unittest.py", line 260, in run
testMethod()
File "C:\sources\roundup-cvs\.\test\test_templating.py",
line 54, in test_look
upIds
self.assertEqual(lookupIds(db._db, prop, ['1','2']),
['1','2'])
File "C:\Python24\lib\unittest.py", line 333, in
failUnlessEqual
raise self.failureException, \
AssertionError: [None, None] != ['1', '2']
----------------------------------------------------------------------
|
msg2138 |
Author: [hidden] (dlinke) |
Date: 2006-03-03 07:41 |
|
Logged In: YES
user_id=734219
no test failure anymore with roundup-1.1.1
|
|
Date |
User |
Action |
Args |
2006-02-05 14:47:27 | dlinke | create | |
|