Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-21516

Default operator of filter is not used as default when creating a new filter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 13.10.3, 15.4
    • Live Data
    • None
    • Unknown

    Description

      How to reproduce

      To avoid steps the first two steps, and having to create data for the live data, you can import [^bugReport_03112023.WebHome.xar]

      1. Create a Live Data on a class which has some properties
      2. Configure the Live Data to filter on of the properties with operator "equals" instead of the default "contains", as in the example code below 
        {{liveData
          id="bugReport_02112023"
          properties="doc.title,shortText1,shortText2,number1"
          source="liveTable"
          sourceParameters="className=bugReport_03112023.pagesForLiveData.myAppForData_03112023.Code.myAppForData_03112023Class"
        }}{
          "query": {
            "filters": [
              {
                "property": "shortText1",
                "constraints": [
                  {
                    "operator": "equals"
                  }
                ]
              }
            ]
          }
        }
        {{/liveData}}
        
      1. Open the filter panel (button with vertical "..." >> Filter...)
      2. If there's already a filter, remove it (If you use the provided files, if this filter is on Short Text 1, you can see that the operator has been set to the configured default value "Equals")
      3. Add a filter with the button at the bottom left of the panel
      4. See that the default operator value is  "Contains" instead of "Equals"

      Expected behaviour

      The operator should be set to its configured default value after the select instead of being set to "Contains".

      Attachments

        1. afterAddFilter.png
          180 kB
          Mathieu Pace
        2. bugReport_03112023.WebHome-1.xar
          18 kB
          Mathieu Pace

        Activity

          People

            Unassigned Unassigned
            mpace Mathieu Pace
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: