Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1201

Adapt Drive for new Trash API behavior

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.6
    • Fix Version/s: 4.0.0
    • Component/s: Tests

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 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
                  2d