core icon indicating copy to clipboard operation
core copied to clipboard

TransferFiles To Custom Directory

Open T0mWz opened this issue 3 years ago • 27 comments

Description

When you migrate a user via files:transfer-ownership, all files will end up in a subfolder , for example ; transferred from old-username on 2020618. Would be nice if the destination path becomes configurable, so that a transfer can end up elsewhere. For example in a subfolder with custom name or directly in the root when you move to a new account.

Related Issue

  • Fixes https://github.com/owncloud/core/issues/38865

How Has This Been Tested?

  • test environment: Acceptance environment
  • test case 1: without arguments
  • test case 2: with empty argument
  • test case 3: with an argument

Screenshots (if appropriate):

root@vm-web-acc-01:/var/www/owncloud # sudo -u apache /usr/bin/php72 /var/www/owncloud/occ files:transfer-ownership --destination-path='' old-user new-user
Analysing files of [email protected] ...
   13 [============================]
Collecting all share information for files and folder of old-user ...
    0 [>---------------------------]
Transferring files to new-user/files/ ...
Restoring shares ...
    0 [>---------------------------]

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [X] New feature (non-breaking change which adds functionality)
  • [ ] Database schema changes (next release will require increase of minor version instead of patch)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Technical debt
  • [ ] Tests only (no source changes)

Checklist:

  • [ ] Code changes
  • [ ] Unit tests added
  • [ ] Acceptance tests added
  • [ ] Documentation ticket raised:
  • [ ] Changelog item, see TEMPLATE

T0mWz avatar Jun 18 '21 15:06 T0mWz

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

update-docs[bot] avatar Jun 18 '21 15:06 update-docs[bot]

Note: this can be tested by adding scenarios to https://github.com/owncloud/core/blob/master/tests/acceptance/features/cliMain/transfer-ownership.feature which will require adapting test code in https://github.com/owncloud/core/blob/master/tests/acceptance/features/bootstrap/TransferOwnershipContext.php etc.

phil-davis avatar Jun 18 '21 17:06 phil-davis

Docs relevant, pls file a issue in docs when close to merge. @EParzefall fyi

Regarding the definable path, pls write which restrictions or prerequisite(s) apply (eg, anywhere in the filesystem, access rights ect)

mmattel avatar Jun 20 '21 13:06 mmattel

:boom: Acceptance tests webUISharingIntGroup1-chrome-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests apiWebdavOperations-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests apiWebdavLocks-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests apiWebdavMove2-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests apiWebdavProperties2-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests webUISettingsMenu-chrome-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests apiSharingNotificationsToShares-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests webUISharingAutocomp2-chrome-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests cliBackground-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests webUISharingAcceptSh-chrome-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests apiFederationToShares2-git-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests apiWebdavPreviews-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests apiWebdavLocks2-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests cliMain-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests webUICreateDelete-chrome-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests apiFederationToRoot1-latest-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests apiWebdavLocks3-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests webUIComments-chrome-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

:boom: Acceptance tests apiWebdavProperties1-mariadb10.2-php7.4 failed. The build is cancelled...

ownclouders avatar Jul 11 '21 18:07 ownclouders

I have rebased and squashed the commits. Rebasing was necessary due to: https://github.com/owncloud/core/pull/38973

mmattel avatar Jul 11 '21 18:07 mmattel

To have a proper documentation preparation, pls tell the restrictions and examples of the paths used.

@micbar @pmaier1 please tell if this will go into 10.8 or not!

mmattel avatar Jul 11 '21 19:07 mmattel

Please create a changelog before merging !

mmattel avatar Jul 11 '21 19:07 mmattel

@T0mWz do you have any update on this?

mmattel avatar Jul 13 '22 08:07 mmattel