[MGNLUI-6208] Provide more flexible datasource filter Created: 14/Sep/20  Updated: 17/Aug/23

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

Type: Improvement Priority: Neutral
Reporter: Viet Nguyen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLUI-6447 Allow custom filters and support limi... Open
relates to MGNLUI-6055 Allow user to add predicates by confi... Closed
causality
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)
Testcase included:
Yes
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: Datasource filtering

 Description   

Steps to reproduce

Currently our JCR data source only support filtering content based on "allowedNodeTypes" configuration point.

Expected results

A more flexible mechanism is expecting from customers so that people could have more options for content filtering. This would affect user experience when dealing with link fields as an example. Also system performance would be better if we won't get all the unnecessary content pushing to the front-end side.

Actual results

https://documentation.magnolia-cms.com/display/DOCS62/JCR+data+source

Workaround

No.

Development notes

Notes to/from developers - Please provide.



 Comments   
Comment by Konstantinos Christodoulou [ 18/Sep/20 ]

Hi all,

The main idea of this functionality is for example create a link field and via yaml define a custom workspace on runtime.

So for example suppose we have the following section of a yaml and the field definition within a subapp:

- name: myLinkField
  fieldType: link
  targetWorkspace: 'a_custom_workspace'  

The record is also going to be stored in 'a_custom_workspace'.

The outcome of this would be when the editor clicked on the linkfield to select a value to parse through the whole a_custom_workspace.

It would be ideal if we could add some criteria there that would filter out the results on the fly. An idea would be to add some 'clause' fields that would more or less run a jcr query with those 'where clauses' and return a smaller dataset.

Another idea would be to have the ability to 'inject' the root path before the selection(OnBeforeEvent type, maybe this is harder i know).

If anyone needs any clarifications regarding we can of course discuss it.

Maybe what i suggest is wrong and i am missing something.

Regards,
Konstantinos

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