[BUG] Copy-PnPList doesn't retain Document Set content type inheritance (across sites) #4381
Open
1 task done
Labels
bug
Something isn't working
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:
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?)
What is the version of the Cmdlet module you are running?
2.12.0
Which operating system/environment are you running PnP PowerShell on?
The text was updated successfully, but these errors were encountered: