Skip to content

Regression: Filtering on Number attributes broken in 1.1.2. Caused by bad query string. #831

@pgiguere1

Description

@pgiguere1

Using any of the dashboard's filter on a Number attribute (equals, less than, greater than...) will always yield zero results.

Reverting to 1.1.0 fixes the issue.

The issue is in the query string building. 1.1.2 and 1.1.0 will not build the same query string for the same filter. Pasting an URL generated by 1.1.0 in dashboard 1.1.2 will make the filter work as expected.


Here's the URL generated for class MyClass filtering on myAttribute equals 1.

1.1.0 (correct):
https://mydomain.com/apps/MyApp/browser/MyClass?filters=%5B%7B%22field%22%3A%22myAttribute%22%2C%22constraint%22%3A%22eq%22%2C%22compareTo%22%3A1%7D%5D

1.1.2 (incorrect):
https://mydomain.com/apps/MyApp/browser/MyClass?filters=%5B%7B%22field%22%3A%22myAttribute%22%2C%22constraint%22%3A%22eq%22%2C%22compareTo%22%3A%221%22%7D%5D

The decoded equivalent:

1.1.0 (correct):

filters=[  
   {  
      "field":"myAttribute",
      "constraint":"eq",
      "compareTo":1
   }
]

1.1.2 (incorrect):

filters=[  
   {  
      "field":"myAttribute",
      "constraint":"eq",
      "compareTo":"1"
   }
]

The compareTo value shouldn't be enclosed in quotation marks.

Appears to have been broken by fcd9e51.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions