Edgewall Software
Modify

#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:

  1. 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
  2. click the "MINUS" button to remove the second condition:
    reproduce step 1
  3. click the "MINUS" button to remove the other condition:
    reproduce step 2
  4. Problem! All "And field" drop-down boxes are lost:
    reproduce step 3

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.

  • TRAC 1.4:
    TRAC 1.4 is affected
  • TRAC 1.2:
    TRAC 1.2 is __not__ affected
  • TRAC 1.0:
    TRAC 1.0 is __not__ affected

Attachments (6)

2022-01-01-trac_query_OR1.png (112.9 KB ) - added by Clemens 21 months ago.
reproduce step 1
2022-01-01-trac_query_OR2.png (117.8 KB ) - added by Clemens 21 months ago.
reproduce step 2
2022-01-01-trac_query_OR3.png (87.0 KB ) - added by Clemens 21 months ago.
reproduce step 3
2022-01-01-trac_query_OR_10.png (118.2 KB ) - added by Clemens 21 months ago.
TRAC 1.0 is not affected
2022-01-01-trac_query_OR_12.png (120.5 KB ) - added by Clemens 21 months ago.
TRAC 1.2 is not affected
2022-01-01-trac_query_OR_14.png (112.1 KB ) - added by Clemens 21 months ago.
TRAC 1.4 is affected

Download all attachments as: .zip

Change History (9)

by Clemens, 21 months ago

reproduce step 1

by Clemens, 21 months ago

reproduce step 2

by Clemens, 21 months ago

reproduce step 3

by Clemens, 21 months ago

TRAC 1.0 is not affected

by Clemens, 21 months ago

TRAC 1.2 is not affected

by Clemens, 21 months ago

TRAC 1.4 is affected

comment:1 by Jun Omae, 21 months ago

Component: generalquery system
Milestone: 1.4.4
Owner: set to Jun Omae
Status: newassigned

Thanks for the reporting! I guess accidents occurs while porting query.html from Genshi template to Jinja2 template.

comment:2 by Jun Omae, 21 months 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
                          &nbsp;<label for="add_filter_2">And</label>&nbsp;

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
                          &nbsp;<label for="add_filter_0">And</label>&nbsp;
                          &nbsp;<label for="add_filter_1">And</label>&nbsp;
                          &nbsp;<label for="add_filter_2">And</label>&nbsp;

comment:3 by Jun Omae, 18 months ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Fixed in [17580] and merged in [17581].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.