Ticket #9303 (closed defect: fixed)
Opened 2 years ago
Last modified 2 years ago
custom query URLs don't respect ''after'' condition
| Reported by: | cboos | Owned by: | rblank |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.12 |
| Component: | report system | Version: | 0.12b1 |
| Severity: | normal | Keywords: | query date |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description (last modified by cboos) (diff)
I noticed that the following link won't work as expected:
The "after" field is left blank (should contain 05/01/10).
The reverse query works:
But:
query:?milestone=next-major-0.1X&changetime=05/01/10;05/05/10
only sets the "before" field, the "after" is also left blank.
We would need that link to work on t.e.o (present in milestone:next-major-0.1X description).
Attachments
Change History
comment:1 Changed 2 years ago by cboos
- Description modified (diff)
comment:2 Changed 2 years ago by rblank
- Owner set to rblank
comment:3 Changed 2 years ago by rblank
comment:4 Changed 2 years ago by rblank
Bad… The ; character is interpreted the same as & by urlparse.parse_qsl() (as an argument separator), which is used by cgi.FieldStorage. This is confirmed by Wikipedia. So the following URL:
/query?milestone=next-major-0.1X&changetime=;05/01/10
results in the following query arguments:
args = [('milestone', 'next-major-0.1X'), ('changetime', ''), ('05/01/10', '')]
It seems that the choice of ; as a date separator was… unwise. Time to change it to '|', I guess…
comment:5 Changed 2 years ago by cboos
or ..?
- 05/01/10..05/05/10
- ..05/05/10
- 05/01/10..
comment:6 Changed 2 years ago by rblank
'|' is a bad choice as well, as it triggers the automatic separation into several arguments. I have a patch ready that uses '@', but I like your '..' better :)
comment:7 Changed 2 years ago by rblank
- Resolution set to fixed
- Status changed from new to closed
Separator changed to '..' in [9637], and documentation updated in TracQuery@26.
comment:8 Changed 2 years ago by cboos
t.e.o updated, queries on milestone:next-major-0.1X now work as they should, thanks a lot!



I'll have a look tomorrow.