Roundup Tracker - Issues

Issue 2551078

classification
Fix traceback caused when putting two id's into a Link html field.
Type: crash Severity: normal
Components: Web interface Versions: 2.0.0
process
Status: fixed fixed
:
: rouilj : rouilj
Priority: normal : NeedsTesting

Created on 2020-01-19 20:34 by rouilj, last changed 2021-05-08 02:34 by rouilj.

Messages
msg6863 Author: [hidden] (rouilj) Date: 2020-01-19 20:34
In the roundup tracker, superseder is a Link type (not multilink as in
classic tracker). If you put in two link id's (1169513,2550964) you get
a traceback:

File ".../roundup/cgi/templating.py", line 886, in __getitem__
if int(self._nodeid) > 0:
ValueError: invalid literal for int() with base 10: '1169513,2550964'

This should be put inside a try/catch block to give a better message
to the user.

Maybe a message like: Property superseder is a Link and only supports 
one value."
msg7221 Author: [hidden] (rouilj) Date: 2021-05-08 02:34
Fixed in changeset:   6398:26e5c42f148c

Captured the ValueError exception. Return the incorrect value upstream
so the user sees the bad value.  hyperdb.py kicks in to report 'you
may only enter ID values for property ...' to the user.

The grammar could use some work but....

It fixes the error using the classic tracker in demo.py. Had to
change superseder back to a Link("issue") and modify issue.page.html
so rendering the View link for the item doesn't loop.

I had no luck figuring out how to trigger this error.
So committing it without an automated test.
History
Date User Action Args
2021-05-08 02:34:40rouiljsetstatus: new -> fixed
versions: + 2.0.0
messages: + msg7221
assignee: rouilj
keywords: + NeedsTesting, - Blocker
resolution: fixed
2021-05-06 19:20:12rouiljsetkeywords: + Blocker
2020-01-19 20:34:47rouiljcreate