[MGNLDAM-900] damLinkField does not allow to select folders Created: 15/Oct/20  Updated: 30/Aug/21  Resolved: 05/Aug/21

Status: Closed
Project: Magnolia DAM Module
Component/s: None
Affects Version/s: 3.0.3
Fix Version/s: 3.0.10

Type: Bug Priority: Neutral
Reporter: Monica Damborenea Assignee: Sang Ngo Huu
Resolution: Fixed Votes: 1
Labels: VN-Implementation
Remaining Estimate: Not Specified
Time Spent: 1d
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Relates
relates to MGNLUI-6974 Choosers could support root selection Open
documentation
to be documented by MGNLDAM-984 DOC: 'damLinkField' can be restricted... Closed
relation
is related to MGNLDAM-902 AssetPreviewProvider throws exception... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: Migrate Assets
Sprint: UI FW 34
Story Points: 1

 Description   

Using damLinkField you are only allowed to select assets, it does not let you select folders. A customer wrote in as they would like to choose a folder (f.e. to display all images in that folder).

There is a workaround using the linkfield, but the chooser is different, the JCR Picker doesn't have an image preview, the saved value is just a UUID and not an itemKey, which is used in all damfn methods.

Steps to reproduce

  1. Dialog definition with damLinkFiel
  2. Try to select a folder instead of an asset
  3. Note that the "choose" button is disabled unless you select an asset
  4. You can remove the IsAssetRuleDefinition rule that way, you can use the damlinkfield to select folders. the chooser.yaml file located in the resources app under /dam-app-core/dialogs/chooser.yaml but this produces follow-up errors

Additional notes
This was working as expected in Magnolia 5.7

Workaround
Decorate https://demo.magnolia-cms.com/.magnolia/admincentral#app:resources:edit;/dam-app-core/dialogs/chooser.yaml:edit and change the availability rule as you wish.



 Comments   
Comment by Roman Kovařík [ 16/Aug/21 ]

For documentation:

The damLinkField can be restricted to assets only (the example is commented out in https://nightly.magnolia-cms.com/.magnolia/admincentral#app:resources:edit;/dam-app-core/dialogs/chooser.yaml:edit)
https://docs.magnolia-cms.com/product-docs/6.2/Templating/Dialog-definition/Field-definition/List-of-fields/Link-field.html#_example_definitions

Generated at Mon Feb 12 05:04:24 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.