diff --git a/changelog/unreleased/enhancement-duplicate-space b/changelog/unreleased/enhancement-duplicate-space index 3428fbf9ea2..f1f5448184b 100644 --- a/changelog/unreleased/enhancement-duplicate-space +++ b/changelog/unreleased/enhancement-duplicate-space @@ -6,4 +6,6 @@ like tags or members. https://github.com/owncloud/web/pull/10024 https://github.com/owncloud/web/pull/10132 +https://github.com/owncloud/web/pull/10139 https://github.com/owncloud/web/issues/10016 +https://github.com/owncloud/web/issues/10123 diff --git a/packages/web-pkg/src/composables/actions/spaces/useSpaceActionsDuplicate.ts b/packages/web-pkg/src/composables/actions/spaces/useSpaceActionsDuplicate.ts index c30fed1c751..1798d20ec79 100644 --- a/packages/web-pkg/src/composables/actions/spaces/useSpaceActionsDuplicate.ts +++ b/packages/web-pkg/src/composables/actions/spaces/useSpaceActionsDuplicate.ts @@ -38,7 +38,8 @@ export const useSpaceActionsDuplicate = ({ const { data: createdSpace } = await clientService.graphAuthenticated.drives.createDrive( { name: duplicatedSpaceName, - description: existingSpace.description + description: existingSpace.description, + quota: { total: existingSpace.spaceQuota.total } }, {} ) diff --git a/packages/web-pkg/tests/unit/composables/actions/spaces/useSpaceActionsDuplicate.spec.ts b/packages/web-pkg/tests/unit/composables/actions/spaces/useSpaceActionsDuplicate.spec.ts index 1580d91b74b..1a3752d85eb 100644 --- a/packages/web-pkg/tests/unit/composables/actions/spaces/useSpaceActionsDuplicate.spec.ts +++ b/packages/web-pkg/tests/unit/composables/actions/spaces/useSpaceActionsDuplicate.spec.ts @@ -18,7 +18,8 @@ const spaces = [ description: 'To the moon', type: 'project', spaceImageData: null, - spaceReadmeData: null + spaceReadmeData: null, + spaceQuota: { total: Math.pow(10, 9) } }) ] describe('restore', () => { @@ -115,7 +116,10 @@ describe('restore', () => { expect(clientService.graphAuthenticated.drives.createDrive).toHaveBeenCalledWith( { description: 'To the moon', - name: 'Moon (1)' + name: 'Moon (1)', + quota: { + total: Math.pow(10, 9) + } }, expect.anything() )