Roundup Tracker - Issues

Issue 1936876

classification
Full-text search fails on empty Link("msg")-property
Type: Severity: normal
Components: Web interface Versions:
process
Status: closed fixed
:
: richard : richard
Priority: normal :

Created on 2008-04-07 16:04 by anonymous, last changed 2008-08-18 07:03 by richard.

Messages
msg2543 Author: [hidden] (anonymous) Date: 2008-04-07 16:04
Hi,

in my installation of roundup 1.4.4 (+ sqlite backend), I have a tracker with the following issue class in schema.py:


issue = IssueClass(db, "issue",
                assignedto=Link("user"),
                keyword=Multilink("keyword"),
                priority=Link("priority"),
                status=Link("status"),
                feedback = Link("msg"))

Feedback is used for settings a message  the that is automatically put into a customized report table for the decision makers in my company. This link is optional and can be empty.

The error I encountered was while performing a full-text search with the web interface. I encountered crashes when  the search results contained an issue for which the feedback result was empty. The error was in indexer_common.py:90:

            for linkprop in propspec.keys():
                for nodeid in klass.get(resid, linkprop):
 
The for loop will fail because klass.get will return None when the feedback field is empty. I was able to work around this bug by adding two lines:

            for linkprop in propspec.keys():
                if type(klass.get(resid, linkprop)) == type(None):
                    continue
                for nodeid in klass.get(resid, linkprop):
 

Another thing I needed to do was to extend indexer:common.py:64 from

            nodeid = entry[1]

to

            nodeid = entry[1].encode('latin-1')

This was neccessary because sometimes the nodeids for the Link('messages') were unicode and this led to crashes in backends/rdbms_common.py:1979:

                values = values.keys()


Best regards,
Fabian
msg2544 Author: [hidden] (anonymous) Date: 2008-05-02 14:00
Logged In: NO 

gagsa
msg2545 Author: [hidden] (richard) Date: 2008-08-18 07:03
Thanks, fixed.
History
Date User Action Args
2008-04-07 16:04:39anonymouscreate