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] When using Set-PnPListItem in batch mode managed metadata column values are not being set when multiple terms are provided #4475

Open
1 of 6 tasks
kboschman opened this issue Oct 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kboschman
Copy link

kboschman commented Oct 24, 2024

Reporting an Issue or Missing Feature

Reporting an issue

Expected behavior

Script:

$list = 'List'
$ID = 1
# Store the terms in an array
$terms = @()
terms += 'TermGroup|TermSet|Term1'
terms += 'TermGroup|TermSet|Term2'

$batch = New-PnPBatch

Set-PnPListItem -List $list -Identity $ID -UpdateType "UpdateOverwriteVersion" -Values @{"ManagedMetadataTest" = $terms;} -Batch $batch

Invoke-PnPBatch -Batch $batch

After execution of the script, the ManagedMetadataTest column should contain the 'Term1' & 'Term2' values.

Actual behavior

The ManagedMetadataTest column is empty.
If the Set-PnPListItem command is executed without the batch parameter, the ManagedMetadataTest column is updated correctly.
Also, if only 1 term is specified, as a string, the Set-PnPListItem command works in batch mode.

Steps to reproduce behavior

  1. Create a term set with multiple terms
  2. Create a managed metadata column called 'ManagedMetadataTest' in a document library based on the existing term set
  3. Create a file in this library and get the ID of the file
  4. Update the variables in the script & execute the script

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

Manifest 2.12.0 PnP.PowerShell Core

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

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify
@kboschman kboschman added the bug Something isn't working label Oct 24, 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