Situation:
The new Trash API adds the property isTrashed to the document. For now, we rely on the lifecycle state deleted to know if a document is trashed or not.
2 tests are failing since NXP-24282:
- test_concurrent_synchronization.py::TestConcurrentSynchronization::test_delete_local_folder_2_clients
- test_local_deletion.py::TestLocalDeletion::test_move_untrash_file_on_parent
Solution:
The trash state of the document and the action of trashing/untrashing the document has to be done differently depending on the server version.
In versions lower than 10.2:
- Trash state: currentLifeCycleState == 'deleted'
- Trash action: Document.SetLifeCycle operation with 'delete'
- Untrash action: Document.SetLifeCycle operation with 'undelete'
In versions higher or equal to 10.2:
- Trash state: check isTrashed == True
- Trash action: Document.Trash operation
- Untrash action: Document.Untrash operation
- depends on
-
NXPY-54 Add new Trash API
- Resolved
- is duplicated by
-
NXDRIVE-1086 Use NXQL ecm:isTrashed instead of ecm:currentLifeCycleState == 'deleted'
- Resolved