Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-28554

Fix editing then saving a saved search

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF35
    • Component/s: Web UI
    • Release Notes Summary:
      Editing then saving a saved search works.
    • Backlog priority:
      900
    • Team:
      UI
    • Story Points:
      3

      Description

      Steps to reproduce:

      1. Log in to the WebUI
      2. Go to the search drawer
      3. Select a criterion (which matches some documents)
      4. Click on the "Save As" button, choose a name and save
      5. Select "Search Filters" to clear the form
      6. Select the saved search
      7. Choose a second criterion (which also matches some documents, better to visualize the filter is taken into account)
      8. Click on the "Save As" button, choose a name and save

      Observe behavior: the popup remains open.
      In the browser console, one can see this message

      nuxeo-app.html:15703 POST http://localhost:8080/nuxeo/api/v1/search/saved 500
      (anonymous) @ nuxeo-app.html:15703
      http @ nuxeo-app.html:15691
      execute @ nuxeo-app.html:16766
      _doExecute @ nuxeo-app.html:24039
      (anonymous) @ nuxeo-app.html:24020
      Promise.then (async)
      execute @ nuxeo-app.html:24018
      post @ nuxeo-app.html:56894
      _saveSearch @ nuxeo-app.html:75393
      handler @ nuxeo-app.html:2291
      _fire @ nuxeo-app.html:7220
      forward @ nuxeo-app.html:7615
      click @ nuxeo-app.html:7578
      _handleNative @ nuxeo-app.html:6998
      :8080/nuxeo/ui/#!/search/default:1 Uncaught (in promise) {entity-type: "exception", status: 500, message: "java.lang.ClassCastException: org.nuxeo.ecm.core.s…st to org.nuxeo.ecm.core.schema.types.ComplexType"}entity-type: "exception"status: 500message: "java.lang.ClassCastException: org.nuxeo.ecm.core.schema.types.SimpleTypeImpl cannot be cast to org.nuxeo.ecm.core.schema.types.ComplexType"__proto__: Object
      Promise.then (async)
      _saveSearch @ nuxeo-app.html:75393
      handler @ nuxeo-app.html:2291
      _fire @ nuxeo-app.html:7220
      forward @ nuxeo-app.html:7615
      click @ nuxeo-app.html:7578
      _handleNative @ nuxeo-app.html:6998
      

      The rename action caused a HTTP 500 error with this response

      {"entity-type":"exception","status":500,"message":"java.lang.ClassCastException: org.nuxeo.ecm.core.schema.types.SimpleTypeImpl cannot be cast to org.nuxeo.ecm.core.schema.types.ComplexType"}

      In the server log, one can see this trace

      ERROR [WebEngineExceptionMapper] java.lang.ClassCastException: org.nuxeo.ecm.core.schema.types.SimpleTypeImpl cannot be cast to org.nuxeo.ecm.core.schema.types.ComplexType
      java.lang.ClassCastException: org.nuxeo.ecm.core.schema.types.SimpleTypeImpl cannot be cast to org.nuxeo.ecm.core.schema.types.ComplexType
      	at org.nuxeo.ecm.automation.core.util.ComplexTypeJSONDecoder.decodeList(ComplexTypeJSONDecoder.java:80) ~[nuxeo-automation-core-10.10-HF15.jar:?]
      	at org.nuxeo.ecm.automation.core.util.ComplexTypeJSONDecoder.decodeList(ComplexTypeJSONDecoder.java:69) ~[nuxeo-automation-core-10.10-HF15.jar:?]
      	at org.nuxeo.ecm.automation.core.util.DocumentHelper.setProperty(DocumentHelper.java:295) ~[nuxeo-automation-core-10.10-HF15.jar:?]
      	at org.nuxeo.ecm.restapi.server.jaxrs.search.SearchObject.setSaveSearchParams(SearchObject.java:263) ~[nuxeo-search-rest-api-10.10.jar:?]
      	at org.nuxeo.ecm.restapi.server.jaxrs.search.SearchObject.doSaveSearch(SearchObject.java:179) ~[nuxeo-search-rest-api-10.10.jar:?]
      

      Expected behavior: the new search is saved without error

        Attachments

        1. saved_searches_10.10.mov
          12.47 MB
          Ricardo Dias
        2. saved_searches_master.mov
          10.83 MB
          Ricardo Dias

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 1 hour, 45 minutes
                  2d 1h 45m