Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-1617

Fix nuxeo-document-preview to handle the case where viewURL is not among the document properties

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.19
    • Fix Version/s: 3.1.x, 3.0.24
    • Component/s: Preview
    • Release Notes Summary:
      Preview is correctly displayed for custom properties when using the nuxeo-document-preview element
    • Backlog priority:
      900
    • Sprint:
      UI - 2023-6, UI COOLDOWN - 2023-5
    • Story Points:
      5

      Description

      Steps to reproduce:

      We want to display the preview of a custom blob from a document returned by an operation : the code below tries to display the preview for the blob stored in the metadata other:file

      <nuxeo-operation op="Context.FetchDocument" input="[[document]]" response="{{returnedDoc}}" enrichers="preview"></nuxeo-operation>
       
      <nuxeo-document-preview document="[[returnedDoc]]" xpath="other:file"></nuxeo-document-preview>
      

       

      Observed behavior: the preview fails because nuxeo-document-preview> cannot find a value for the key viewUrl : https://github.com/nuxeo/nuxeo-elements/blob/cbf26a8cec73894fbf5a79ac812e77a9b45a2ae2/ui/nuxeo-document-preview.js#L354).

       

      Expected behavior: the preview is correctly displayed for this custom blob property

        Attachments

        1. image-2023-06-02-15-30-39-009.png
          263 kB
          Poonam Yadav

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 week, 3 days
                  1w 3d
                  Remaining:
                  Time Spent - 3 days, 1 hour Remaining Estimate - 4 days, 6 hours
                  4d 6h
                  Logged:
                  Time Spent - 3 days, 1 hour Remaining Estimate - 4 days, 6 hours
                  3d 1h