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

Filtering LiveData: Unwanted Results for StaticList Fields

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 16.4.6
    • Live Data
    • None
    • Unknown

    Description

      It’s seams that LiveData uses a "contains" filter operator even for static list properties.

      Steps to reproduce:

      1. Create an AWM app with a static list (staticList1: Static List):

      value1=First Choice|value2=Second Choice|value3=Third Choice|value33=No Choice

      2. Add a LiveTable and a LiveData table to a new page:

      {{velocity}}
      #set ($columnsProperties = {'doc.title': {"link":"view"}, 'staticList1': {} })
      #set ($options = {'className': 'Sandbox.FilterData.Code.FilterDataClass', 'translationPrefix': 'filterdata.livetable.'})
      #set ($columns = ['doc.title', 'staticList1'])
      #livetable('filtertest' $columns $columnsProperties $options)
      {{/velocity}}
      
      {{liveData properties="doc.title, staticList1" source="liveTable" sourceParameters="translationPrefix=platform.index.&className=Sandbox.FilterData.Code.FilterDataClass"}}{{/liveData}} 

      3. Add four entries covering all possible choices.

      4. Filter the data by “Third Choice”:

      Expected result:
      Both tables should only display the entry for “Third Choice.”

      Actual result:

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            CycleSEC Sebastian Klipper
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: