[MGNLREST-738] Can't configure a reference resolver for multiple JcrMultiFields Created: 11/Jul/23  Updated: 16/Jan/24

Status: Open
Project: Magnolia REST Framework
Component/s: delivery
Affects Version/s: 2.2.20
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: Roberto Gaona Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: Support
Team: DeveloperX

 Description   

Steps to reproduce

  1. Configure a page component containing multiple jcrMultiField, each pointing towards a different workspace (category and tours, for example)
        categories:
          $type: jcrMultiField
          field:
            $type: linkField 
            required: true 
            datasource: 
              $type: jcrDatasource 
              workspace: category
              rootPath: /
              allowedNodeTypes:
                - mgnl:folder
                - mgnl:category
        tours:
          $type: jcrMultiField
          field:
            $type: linkField 
            required: true 
            datasource: 
              $type: jcrDatasource 
              workspace: tours
              rootPath: /
              allowedNodeTypes:
                - mgnl:folder
                - mgnl:content
  1. Configure a REST endpoint to point towards the page containing it, trying to resolve both "field" fields from each jcrMultiField.
      - name: categoryList
        propertyName: field
        referenceResolver:
          $type: jcrReferenceResolver
          targetWorkspace: category    
          
      - name: toursList
        propertyName: field
        referenceResolver:
          $type: jcrReferenceResolver
          targetWorkspace: tours  
    
  1. Perform the REST request over a page with the configured page component

Expected results

Since targetWorkspace is defined for each reference resolver, I would expect both "field" properties to be correctly resolved.

Actual results

Only one of the properties is resolved, while the other is left untouched.


Generated at Mon Feb 12 07:02:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.