[MGNLUI-8095] Including jcrPublishingStatus within column list breaks the chooser Created: 29/May/23  Updated: 02/Aug/23  Resolved: 28/Jul/23

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

Type: Bug Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Jaromir Sarf
Resolution: Won't Do Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 1d 5h Time Spent: 1d 5h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: File customChooser.yaml     File image.yaml     Text File stacktrace.txt    
Issue Links:
Cloners
is cloned by MGNLDAM-1224 CLONE - Including jcrPublishingStatus... Closed
Problem/Incident
documentation
to be documented by MGNLUI-8195 DOCu: provide documentation for statu... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLUI-8161 Implementation Sub-task Completed Jaromir Sarf  
MGNLUI-8162 Code review Sub-task Completed Adam Siska  
MGNLUI-8163 Pre-Integration QA Sub-task Completed Adam Siska  
MGNLUI-8164 QA Sub-task 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:
Sprint: Nucleus 40
Story Points: 2
Team: Nucleus
Work Started:
Approved:
Yes

 Description   

Steps to reproduce

  1.  Go to demo and edit /dam-app-core/includes/chooser.yaml file
  2.  Include the jcrPublishing status within the tree and list view
    jcrPublishingStatus: 
      width: 150
      $type: jcrStatusColumn
  1. Create a page (basic Template)
  2. Within the main area, create an Image component
  3. Click on "Select new" button
  4. Check that tho the chooser opens, an error appears and no asset is displayed

Expected results

The dialog opens normally, the assets can be selected and ordered

Actual results

An error is thrown and no asset are displayed

Workaround

N/A

Development notes

N/A



 Comments   
Comment by Quach Hao Thien [ 20/Jun/23 ]

Discovery:

StatusValueProvider of JcrStatusColumnDefinition implements the com.vaadin.data.ValueProvider<javax.jcr.Item, String> (JcrStatusColumnDefinition.java#95), meanwhile the Grid passes the item to value provider, which is info.magnolia.dam.jcr.JcrFolder (implementing the info.magnolia.dam.api.Item) at that moment. So that is the cause of class cast exception.

Propose solution:

Implement a new ValueProvider<info.magnolia.dam.api.Item, String> for Dam status column, ref: AssetNameColumnDefinition.java 

Comment by Jaromir Sarf [ 18/Jul/23 ]

As solution we can use these configs customChooser.yaml image.yaml. Instead of using damLinkField, we have linkField configured to work with assets and then we are able to use jcrStatusColumn and filter by this column.

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