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

Live data list filter should display and filter by (translated) labels for static list properties

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.10.5, 13.1
    • Fix Version/s: 13.10-rc-1
    • Component/s: Live Data, REST
    • Labels:
      None
    • Tests:
      Unit, Integration
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Pull Request Status:
      Pull Request accepted
    • Similar issues:

      Description

      The list filter in live data only displays the values, not the labels. See, e.g., /xwiki/bin/view/Help/Applications/Movies/?useLiveData=true - there, in the dropdown of the Movies filter, e.g., instead of the configured label "Sci-Fi", only "sf" is displayed. This also doesn't consider any translations. Note that LT displays the translated value if there is any or otherwise the label and only the value if there is neither a translation nor a label. LD should do the same. Further, LD allows filtering the values. Filtering is done in the client and by requesting values with the entered text as filter from the server as initially only 10 values are loaded. The filtering on the server side currently also only considers the values and not the (translated) labels. It is important to also consider the displayed label for filtering as the user most likely doesn't know the underlying value but only the displayed labels, which can be very different. The REST API uses ClassPropertyValuesResourceImpl as implementation, which gets the values from StaticListClassPropertyValuesProvider in this case.

      A possible solution is thus to change StaticListClassPropertyValuesProvider to put the translation or, if there is none, the label into the label property of the metadata which is already provided by implementations for other kinds of properties (like documents) and already displayed by LD. Further, the implementation could then also search in the provided label on the server side (the filtering also happens in StaticListClassPropertyValuesProvider).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              MichaelHamann Michael Hamann
              Reporter:
              MichaelHamann Michael Hamann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: