[MGNLUI-6016] Column filtering with comboBoxField and optionListDatasource creates wrong query Created: 30/Apr/20  Updated: 05/Mar/21  Resolved: 05/Mar/21

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Tobias Kerschbaum Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 20m
Original Estimate: Not Specified

Issue Links:
duplicate
is duplicated by MGNLUI-6364 Column Filter: comboBoxField with opt... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: UI framework implementation

 Description   

I don´t get any results if i configure my column filter like this: https://git.magnolia-cms.com/projects/INCUBATOR/repos/uri-mapping-app/browse/src/main/resources/uri-mapping-app/apps/uri-mapping-app.yaml?at=refs%2Fheads%2FupdateTo6.2

Speaking about this part:

- name: actionPrefix
  label: Action Prefix
  width: 100
  filterComponent:
    $type: comboBoxField
    emptySelectionAllowed: true
    textInputAllowed: true
    filteringMode: STARTSWITH
    datasource:
      $type: optionListDatasource
      options:
        forward:
          value: forward
        redirect:
          value: redirect
        permanent:
          value: permanent

Checked the problem whit rkovarik and he told me that the Quer is created like this: 

LOWER(t.value) like ‘%info.magnolia.ui.datasource.optionlist.option@4e382f59%’



 Comments   
Comment by Richard Gange [ 30/Apr/20 ]

I don't think it's been implemented yet. At least I don't see it being used in the factory class.

Comment by Richard Gange [ 30/Apr/20 ]

rkovarik it looks to me the CB field factory is not overriding the correct method. I think AbstractSelectFieldFactory is where filteringMode is being used. In #createField().

ComboBoxFieldFactory is using #createFieldComponent() which seems to be bypassing #createField(). Or am I missing something?

Comment by Richard Gange [ 30/Apr/20 ]

Here is a REST example CB --> RestComboBoxFieldFactory

Generated at Mon Feb 12 09:32:19 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.