Opened 16 years ago
Closed 16 years ago
#7424 closed defect (fixed)
Reports that use URL parameters break when paginating
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11.2 |
Component: | report system | Version: | 0.11-stable |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Some plugins (ie:TimingAndEstimationPlugin) add custom reports to trac and use aditional parameters, like:
http://example.com/trac/report/63?BILLABLE=1&UNBILLABLE=1&NOVO=novo&EMANDAMENTO=em_andamento&REABERTO=reaberto&RESOLVIDO=resolvido&FECHADO=fechado&TESTE=teste&ATRIBUIDO=atribuido&NEW=new&VERIFICADO=verificado&STARTDATE=0&ENDDATE=2000000000
that report on first load, works fine, but page '2' link breaks, pointing to
http://example.com/trac/report/63?page2
loosing URL query info, needed by report.
Plugin site: http://trac-hacks.org/wiki/TimingAndEstimationPlugin
Attachments (0)
Change History (12)
comment:1 by , 16 years ago
Keywords: | http://trac-hacks.org/wiki/TimingAndEstimationPlugin removed |
---|---|
Milestone: | 0.11.1 |
Resolution: | → invalid |
Severity: | critical → normal |
Status: | new → closed |
comment:2 by , 16 years ago
Milestone: | → 0.11.1 |
---|---|
Resolution: | invalid |
Status: | closed → reopened |
No, I think it's a rightful one.
I haven't verified yet, but from the report it seems that extra request parameters are not part of the paging links, which could then break any report which expects extra report variabes.
comment:3 by , 16 years ago
Easy to verify actually: report:14?PRIORITY=high → then click on a page link.
comment:4 by , 16 years ago
@eblot:you don't need to close a ticket just 'cause you're guessing that is invalid, read ticket before , not personally, but this way you will loose users contrib.
@cboos: perfect!
follow-up: 6 comment:5 by , 16 years ago
well, well, you can't imagine how many such invalid reports we get, especially for the AccountManager plugin, so it's basically a reflex when we see it mentioned in a ticket, and I nearly did it myself as well ;-)
comment:6 by , 16 years ago
Replying to cboos:
well, well, you can't imagine how many such invalid reports we get, especially for the AccountManager plugin, so it's basically a reflex when we see it mentioned in a ticket, and I nearly did it myself as well ;-)
I understood, and really isn't personally with eblot.but let's leave this and focus on ticket :-). I'll try to make a patch next weekend, some tip in how i can get parameters like in query module?
comment:7 by , 16 years ago
Owner: | set to |
---|---|
Status: | reopened → new |
Would have loved to get a patch from you, but as I was looking at the code for providing the hints you asked for, I also saw the bug ;-)
-
trac/ticket/report.py
323 323 shown_pages = paginator.get_shown_pages(21) 324 324 for p in shown_pages: 325 325 pagedata.append([req.href.report(id, asc=asc, sort=sort_col, 326 USER=user, page=p),326 page=p, **args), 327 327 None, str(p), _('Page %(num)d', num=p)]) 328 328 329 329 fields = ['href', 'class', 'string', 'title']
So now you can help by testing it…
comment:8 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Ow..this is fast! I just apply this directly and works quite fine.
I tested with some plugins and native reports too.
comment:9 by , 16 years ago
Ok, patch applied in r7346 (and sorry, I apparently have a bug in my commit script, as the message didn't get through).
follow-up: 12 comment:10 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The applied patch works for paging, but it doesn't include changes for navigation arrows for previous and next. They don't work properly.
comment:11 by , 16 years ago
Milestone: | 0.11.1 → 0.11.2 |
---|
comment:12 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Replying to anonymous:
The applied patch works for paging, but it doesn't include changes for navigation arrows for previous and next. They don't work properly.
Right, the same fix is needed for these links, as well as the query_href
session parameter, otherwise the "Back to Query" link in the ticket view doesn't work either.
Fixed in [7476].
About plugin, re-read NewTicket#Whentonotcreateatickethere