-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 10.10
-
Fix Version/s: 10.10-HF19, 11.1, 2021.0
-
Component/s: Core
-
Release Notes Summary:The path of trashed child documents is correctly restored.
-
Tags:
-
Backlog priority:600
-
Team:PLATFORM
-
Sprint:nxplatform 11.1.21, nxplatform 11.1.22, nxplatform 11.1.23
-
Story Points:1
This can be reproduced on nightly:
- create a folder named pouetFolder
- create a folder in it named pouetFolderChild
- trash pouetFolderChild
- trash pouetFolder
- After trashing the parent folder, its path is renamed and the isTrashed flag is set:
curl -sSL -u Administrator:Administrator https://nightly.nuxeo.com/nuxeo/api/v1/path/default-domain/workspaces/pouetSpace/pouetFolder._1568188481461_.trashed | jq . { "entity-type": "document", "repository": "default", "uid": "3d3e1aae-5b1c-4314-b720-10b42e8d51d5", "path": "/default-domain/workspaces/pouetSpace/pouetFolder._1568188481461_.trashed", "type": "Folder", "state": "project", "parentRef": "e4e625f9-55cb-4d8b-bb12-8e8d363447ce", "isCheckedOut": true, "isVersion": false, "isProxy": false, "changeToken": "2-0", "isTrashed": true, "title": "pouetFolder", "lastModified": "2019-09-11T07:54:01.837Z", "facets": [ "Folderish", "NXTag" ], "schemas": [ "common", "dublincore", "facetedTag" ] }
And so does the child:
curl -sSL -u Administrator:Administrator https://nightly.nuxeo.com/nuxeo/api/v1/path/default-domain/workspaces/pouetSpace/pouetFolder._1568188481461_.trashed/pouetFolderChild._1568188472362_.trashed | jq . { "entity-type": "document", "repository": "default", "uid": "3ef8262d-00fa-4958-9524-58248461470f", "path": "/default-domain/workspaces/pouetSpace/pouetFolder._1568188481461_.trashed/pouetFolderChild._1568188472362_.trashed", "type": "Folder", "state": "project", "parentRef": "3d3e1aae-5b1c-4314-b720-10b42e8d51d5", "isCheckedOut": true, "isVersion": false, "isProxy": false, "changeToken": "2-0", "isTrashed": true, "title": "pouetFolderChild", "lastModified": "2019-09-11T07:54:17.323Z", "facets": [ "Folderish", "NXTag" ], "schemas": [ "common", "dublincore", "facetedTag" ] }
- Restore the parent pouetFolder and observe the parent's path is renamed and cannot be found by its trashed path:
curl -sSL -u Administrator:Administrator [https://nightly.nuxeo.com/nuxeo/api/v1/path/default-domain/workspaces/pouetSpace/pouetFolder._1568188481461_.trashed] | jq . { "entity-type": "exception", "status": 404, "message": "/default-domain/workspaces/pouetSpace/pouetFolder._1568188481461_.trashed" }
But only by its original path:
curl -sSL -u Administrator:Administrator https://nightly.nuxeo.com/nuxeo/api/v1/path/default-domain/workspaces/pouetSpace/pouetFolder | jq . { "entity-type": "document", "repository": "default", "uid": "3d3e1aae-5b1c-4314-b720-10b42e8d51d5", "path": "/default-domain/workspaces/pouetSpace/pouetFolder", "type": "Folder", "state": "project", "parentRef": "e4e625f9-55cb-4d8b-bb12-8e8d363447ce", "isCheckedOut": true, "isVersion": false, "isProxy": false, "changeToken": "3-0", "isTrashed": false, "title": "pouetFolder", "lastModified": "2019-09-11T07:54:01.837Z", "facets": [ "Folderish", "NXTag" ], "schemas": [ "common", "dublincore", "facetedTag" ] }
Which is correct and expected.
- Nevertheless, the child is untrashed but its path is not renamed.
The isTrashed flag is unset but the trashed path remains.
Trying to access it through its trashed path still works:curl -sSL -u Administrator:Administrator https://nightly.nuxeo.com/nuxeo/api/v1/path/default-domain/workspaces/pouetSpace/pouetFolder/pouetFolderChild._1568188472362_.trashed | jq . { "entity-type": "document", "repository": "default", "uid": "3ef8262d-00fa-4958-9524-58248461470f", "path": "/default-domain/workspaces/pouetSpace/pouetFolder/pouetFolderChild._1568188472362_.trashed", "type": "Folder", "state": "project", "parentRef": "3d3e1aae-5b1c-4314-b720-10b42e8d51d5", "isCheckedOut": true, "isVersion": false, "isProxy": false, "changeToken": "3-0", "isTrashed": false, "title": "pouetFolderChild", "lastModified": "2019-09-11T07:54:17.323Z", "facets": [ "Folderish", "NXTag" ], "schemas": [ "common", "dublincore", "facetedTag" ] }
Obviously the original path has not been restored:
curl -sSL -u Administrator:Administrator https://nightly.nuxeo.com/nuxeo/api/v1/path/default-domain/workspaces/pouetSpace/pouetFolder/pouetFolderChild | jq . { "entity-type": "exception", "status": 404, "message": "/default-domain/workspaces/pouetSpace/pouetFolder/pouetFolderChild" }
Expected behavior: the restored children documents should have their path updated like the parent.
- is related to
-
NXP-28283 Make the Untrash action smarter
- Reopened