[MGNLDAM-922] damLinkField: rootPath property not supported Created: 23/Dec/20  Updated: 13/Jun/23  Resolved: 22/Nov/21

Status: Closed
Project: Magnolia DAM Module
Component/s: None
Affects Version/s: 3.0.5
Fix Version/s: 3.0.12

Type: Bug Priority: Neutral
Reporter: Jan Haderka Assignee: Nguyen Phung Chi
Resolution: Fixed Votes: 1
Labels: VN-Maintenance, maintenance
Remaining Estimate: Not Specified
Time Spent: 4d 6.25h
Original Estimate: Not Specified

Issue Links:
causality
is causing MGNLDAM-1115 Uploading content through damLinkFiel... Closed
dependency
is depended upon by MGNLUI-6954 "targetTreeRootPath" is not supported... 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
[X]* Affected version filled
Date of First Response:
Sprint: Assets Maintenance 2
Story Points: 5

 Description   

Steps to reproduce

Create DAM link field in any app and try to limit selection to any particular folder.

$type: damlinkField
datasource: 
  class: info.magnolia.dam.app.data.AssetDatasourceDefinition #an alias for $type is missing
  rootPath: /tours #this property doesn't exist

.. Logs, screenshots, gifs...

Expected results

Chooser dialog associated with link field is limited to selected folder and subfolders when opened.

Actual results

M5 syntax is not valid in M6.2 and no equivalent syntax exists.

Workaround

Use JCR datasource instead of the asset datasource

$type: linkField
datasource: 
  $type: jcrDatasource
  workspace: dam
  rootPath: /tours

Development notes



 Comments   
Comment by Roman Kovařík [ 23/Dec/20 ]

Another workaround:

Inherit default asset chooser.
Add availability rule to chooser action:

actions:
  choose:
    availability:
      rules:
        path:
          class: info.magnolia.dam.app.action.availability.IsAssetPathRuleDefinition
          path: /path

Use in a link field:

form:
  properties:
    - name: image
      $type: damlinkField
      chooserId: myModule:mychooser

 

Comment by Ulrich Scheel [ 02/Nov/21 ]

java.lang.ClassNotFoundException: info.magnolia.dam.app.action.availability.IsAssetPathRuleDefinition

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