Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#4,381 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, powershell
Ambito
backend

Direzione di ricerca

Inizia tracciando l’implementazione di Copy-PnPList e la gestione dei tipi di contenuto tra siti, quindi riproduci il problema con il comando PowerShell documentato e la configurazione di Document Set. Il lavoro è completato quando una raccolta copiata conserva il Document Set padre e la relativa configurazione tra siti, mentre la copia all’interno dello stesso sito continua a funzionare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
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
Lingua principale
C#
Stelle
904
Fork
407
Merge medio
2g 9h
PR unite (30g)
10

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pnp/powershell

Tutte le issue di pnp/powershell

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.