Roundup Tracker - Issues

Issue 2551413

classification
Broken MultiLink columns in CSV export
Type: crash Severity: major
Components: Web interface Versions: 2.5.0
process
Status: fixed fixed
:
: rouilj : cmeerw, rouilj
Priority: high :

Created on 2025-12-13 23:37 by cmeerw, last changed 2025-12-15 17:52 by rouilj.

Messages
msg8420 Author: [hidden] (cmeerw) Date: 2025-12-13 23:37
Attempting to include a MultiLink column (that's not "name") will result in a Traceback or 
incorrect data being exported.

At least this change (which removes a hardcoded "name") should be applied:

diff --git a/roundup/cgi/actions.py b/roundup/cgi/actions.py
index 7d12af4a..ef987f3e 100644
--- a/roundup/cgi/actions.py
+++ b/roundup/cgi/actions.py
@@ -1688,7 +1688,6 @@ class ExportCSVAction(Action):
             if isinstance(props[col], hyperdb.Multilink):
                 cname = props[col].classname
                 cclass = self.db.getclass(cname)
-                represent[col] = repr_list(cclass, 'name')
                 if not self.hasPermission(self.permissionType, classname=cname):
                     represent[col] = repr_no_right(cclass, 'name')
                 else:

To test: run the demo tracker, create an issue, and then attempt a CSV export, including 
the "messages" column.
msg8421 Author: [hidden] (rouilj) Date: 2025-12-15 17:52
Hi Christof:

I did two different fixes for this. I replaced rev 918792e35e0 with
rev 166cb26323 which changes the line you deleted to:

    represent[col] = repr_list(cclass, 'id')

It now produces: "1;3" for the normal (named/labeled) export csv and "['1', '3']"
for the id version of export csv.

If the class has a name field the names of the items are printed rather than the
ids.

Thanks for finding this and submitting a fix change and a reproducible test case.
It made my work a lot easier.

Happy holidays.

-- rouilj
History
Date User Action Args
2025-12-15 17:52:57rouiljsetstatus: new -> fixed
nosy: + rouilj
messages: + msg8421
priority: normal -> high
assignee: rouilj
resolution: fixed
2025-12-13 23:37:02cmeerwcreate