pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
985 stars 665 forks source link

[BUG] Set-PnPDefaultColumnValues not working on the DateTime field and also causing "Column default value settings" page in Library settings to throw error "Sorry, something went wrong page (An unexpected error has occurred.)" #2996

Open democ2s opened 3 years ago

democ2s commented 3 years ago

If you have a question and are not reporting a bug, please go to:

https://github.com/pnp/pnp-powershell/discussions

Notice

Many bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:

  1. Are you using Apply-PnPProvisioningTemplate or Get-PnPProvisioningTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/pnp/PnP-Sites-Core/issues.
  2. Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
  3. If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/pnp/PnP-PowerShell/tree/master/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/pnp/PnP-Sites-Core/issues

Reporting an Issue or Missing Feature

Please confirm what it is that your reporting. Not able to use this cmdlet to set default values to DateTime field and also post running this cmdlet am not able to open "Column default value settings" page in Library settings as it is causing the error "Sorry, something went wrong page (An unexpected error has occurred.)"

Expected behavior

Please describe what output you expect to see from PnP-PowerShell Cmdlets It should set the default DateTime field value in the library

Actual behavior

Please describe what you see instead. Please provide samples of HTML output or screenshots

  1. Post running of this cmdlet, am not getting any error but it is not setting the default value
  2. It is also causing the "Column default value settings" in Library settings to throw an error "Sorry, something went wrong page (An unexpected error has occurred.)"

Steps to reproduce behavior

Please include complete code samples in-line or linked from gists

Set-PnPDefaultColumnValues -List "Temp" -Field "DateClosed" -Value "01/08/2020"

Set-PnPDefaultColumnValues -List "Temp" -Field "DateClosed" -Value "25 September 2020 14:02:52"

Both are leading to "Something went wrong" page and also not setting the default column value.

Which version of the PnP-PowerShell Cmdlets are you using?

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

(you can retrieve this by executing Get-Module -Name sharepointpnppowershell* -ListAvailable)

3.25.2009.1

How did you install the PnP-PowerShell Cmdlets?