Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Copy-PnPList doesn't retain Document Set content type inheritance (across sites) #4381

Open
1 task done
SabbeRubbish opened this issue Oct 4, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@SabbeRubbish
Copy link

Expected behavior

When I copy a document library configured with document sets, I expect the content type configuration to be copied as well.

Actual behavior

When copying a list, the content type is copied, but it inherits from "Item" instead of "Document Set".

Note that this works if correctly if you copy to the same site. It doesn't work when correctly when you copy to a different site (on the same tenant).

Steps to reproduce behavior

  • Create a content type with parent content type "Document Set" in the TENANT (!) content type gallery (e.g. "Project") - you may need to activate the Document Set feature on the /sites/contenttypehub site collection first

  • Add a field "Owner" type Person or Group with default settings

  • Create a new (non-Microsoft 365-connected) Team Site "docsettest"

  • Enable the management of Document Sets on site level

  • Create a library Source

  • Enable the management of Content Types

  • Add content type from existing content types - select newly created "Project" content type

  • Go to list settings and see the document set there and note its configuration:
    image

  • Create a new (non-Microsoft 365-connected) Team Site "docsettest2"

  • Enable the management of Document Sets on site level

Now, in Powershell, connect to the site and execute:
Copy-PnPList -SourceListUrl "https://***.sharepoint.com/sites/docsettest/Source" -DestinationWebUrl "https://***.sharepoint.com/sites/docsettest2" -Title "Destination"

You'll see that the content type is not configured correctly (how do you even add an "Item" in a document library?)
image

What is the version of the Cmdlet module you are running?

2.12.0

Which operating system/environment are you running PnP PowerShell on?

  • Windows
@SabbeRubbish SabbeRubbish added the bug Something isn't working label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant