Opened 3 years ago
Closed 3 years ago
#13455 closed defect (fixed)
query web UI broken after using OR condition
Reported by: | Clemens | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.4.4 |
Component: | query system | Version: | 1.4.3 |
Severity: | normal | Keywords: | |
Cc: | c.feige@… | Branch: | |
Release Notes: |
Fix lack of "Add" dropdowns in filter form of query page. |
||
API Changes: | |||
Internal Changes: |
Description
Summary
In the query web UI the "And field" will be lost when using (and removing) a logical OR condition.
Eventually we have a situation where the query web UI has become unuseable. It is impossible to add new query conditions because all "And field" drop-down boxes are lost.
Reproduce
Tested with TRAC demo site (running TRAC 1.4.3). This is how to reproduce:
- Create a custom ticket query with an OR condition:
https://trac.edgewall.org/demo-1.4/query?status=accepted&or&resolution=fixed&col=id&col=summary&col=status&col=owner&col=type&col=priority&col=milestone&order=priority - click the "MINUS" button to remove the second condition:
- click the "MINUS" button to remove the other condition:
- Problem! All "And field" drop-down boxes are lost:
TRAC versions
This seems to be a regression in a new TRAC version. Comparing the differences between different we can see that in TRAC 1.4 there seem to be one "And field" missing.
Attachments (6)
Change History (9)
by , 3 years ago
Attachment: | 2022-01-01-trac_query_OR1.png added |
---|
comment:1 by , 3 years ago
Component: | general → query system |
---|---|
Milestone: | → 1.4.4 |
Owner: | set to |
Status: | new → assigned |
Thanks for the reporting! I guess accidents occurs while porting query.html from Genshi template to Jinja2 template.
comment:2 by , 3 years ago
Proposed changes in [ccc394b13/jomae.git] (jomae.git@t13455).
Before the patch:
$ curl -s 'https://trac.edgewall.org/demo-1.2/query?status=accepted&or&resolution=fixed&or&owner=$USER' | grep -w And <label for="add_filter_0">And</label> <label for="add_filter_1">And</label> <label for="add_filter_2">And</label> $ curl -s 'https://trac.edgewall.org/demo-1.4/query?status=accepted&or&resolution=fixed&or&owner=$USER' | grep -w And <label for="add_filter_2">And</label>
After the patch:
$ curl -s 'http://127.0.0.1:3000/1.4-sqlite/query?status=accepted&or&resolution=fixed&or&owner=$USER' | grep -w And <label for="add_filter_0">And</label> <label for="add_filter_1">And</label> <label for="add_filter_2">And</label>
comment:3 by , 3 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
reproduce step 1