Roundup Tracker - Issues

Issue 1578598

classification
is sort-on/group-by broken for issue searching?
Type: Severity: normal
Components: Web interface Versions:
process
Status: closed works for me
:
: richard : richard, schlatterbeck
Priority: normal :

Created on 2006-10-17 00:18 by anonymous, last changed 2006-10-17 19:18 by anonymous.

Messages
msg2310 Author: [hidden] (anonymous) Date: 2006-10-17 00:18
I just downloaded 1.2.1 and tried to run it on my 
existing tracker database (after making appropriate 
changes to config.ini etc). I've upgraded twice before 
without any problems.

User items and indexes come up fine, but issues do NOT.
My templates are based on the "classic" ones but with 
some added fields. I tried the classic 
index.search.html as shipped with 1.2.1 and it fails 
too.

The error looks like the following:

----

Templating Error

exceptions.IndexError: list index out of range

Debugging information follows
In python expression "request.group[1]"
While evaluating the expression on line 38 Current 
variables:
templates	<roundup.cgi.templating.Templates instance 
at 0xf6a46acc>
repeat	
<roundup.cgi.PageTemplates.TALES.SafeMapping instance 
at 0xf68ba48c>
false	0
context	<HTMLClass(0xf68ba32c) issue>
utils	<roundup.cgi.templating.TemplatingUtils instance 
at 0xf68ba40c>
db	<roundup.cgi.templating.HTMLDatabase instance at 
0xf68ba3cc>
nothing	None
i18n	
<roundup.cgi.TranslationService.TranslationService 
instance at 0xf6897f8c>
true	1
default	<roundup.cgi.PageTemplates.TALES.Default 
instance at 0xf6b19eec>
request	<HTMLRequest FieldStorage(None, None, 
[MiniFieldStorage('@template', 'test')])>
tracker	<roundup.instance.Tracker instance at 
0xf6ad8c4c>
template	<Roundup PageTemplate 'issue.test.html'>
config	<roundup.configuration.CoreConfig instance 
at 0xf6ad89ec>
options	{'ok_message': [], 'error_message': []}
loop	<roundup.cgi.PageTemplates.TALES.SafeMapping 
instance at 0xf68ba48c>
i	<HTMLItem(0xf668cd2c) issue 1>
attrs	{'tal:define': 'group python:request.group[1]', 
'tal:condition': 'python:group and 
batch.propchanged(group)'}
batch	<roundup.cgi.templating.Batch instance at 
0xf66ce7ec>

A problem occurred in your template "issue.test.html".

----

Always (thru many variations of the template code) it 
complains about request.group[] or request.sort[].
I think the problem concerns these lines from the 
template (and similar in issue.index.html):

   sort_on python:request.sort and request.sort[0] or 
nothing;
   sort_desc python:sort_on and sort_on[0] == '-';
   sort_on python:(sort_on and sort_on[1]) or 
'activity';
   group_on python:request.group and request.group[0] 
or nothing;
   group_desc python:group_on and group_on[0] == '-';
   group_on python:(group_on and group_on[1]) or 
'priority';

But when radically simplifying this to just "sort_on 
python:'activity'" etc etc the problem remains, so it 
isn't in the template itself but rather something 
deeper in the underlying supporting code, I guess?
I really want to use the new sorting features but must 
retain my (very extensive) database.
msg2311 Author: [hidden] (schlatterbeck) Date: 2006-10-17 10:49
Logged In: YES 
user_id=34818

Did you follow the upgrading instructions in
doc/upgrading.txt? There is a section labelled "Migrating
from 1.1.2 to 1.X.X" (sic) which describes the changes in
sorting/grouping. In particular you want to change the
renderWith call in home.html as indicated in upgrading.txt
(when you have already done the changes in issue.index.html)
msg2312 Author: [hidden] (anonymous) Date: 2006-10-17 19:18
Logged In: NO 

Thanks -- my issue.index.html is now working correctly.

It wasn't clear to me from the CHANGES.txt and a cursory 
reading of doc/upgrading.txt that my templates needed
to be changed to continue working the old-sort way.
But your suggestion pointed in the right direction.

And the new-sort features are a definite improvement.
History
Date User Action Args
2006-10-17 00:18:03anonymouscreate