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] The parameter 'IsDefault' on the cmdlet New-PnPTermLabel is not working properly #4515

Open
TRACKSENS opened this issue Nov 5, 2024 · 2 comments · May be fixed by #4569
Open

[BUG] The parameter 'IsDefault' on the cmdlet New-PnPTermLabel is not working properly #4515

TRACKSENS opened this issue Nov 5, 2024 · 2 comments · May be fixed by #4569
Labels
bug Something isn't working

Comments

@TRACKSENS
Copy link

Hello,

On the cmdlet New-PnPTermLabel, if the parameter 'IsDefault' is set, it should insert a default label (a name).

If the parameter 'IsDefault' is not present, it should insert a synonym.

Actual behavior

Currently the presence/absence of the parameter 'IsDefault' does no do anything. The new label is always inserted as default label, and the previous one is set as a 'synonym'.

Steps to reproduce behavior

This code should include a synonym on the term:
New-PnPTermLabel -Name "City of Paris" -Lcid 1033 -Term myTermId

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

Module version : 2.12.0

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

  • [*] Windows
@TRACKSENS TRACKSENS added the bug Something isn't working label Nov 5, 2024
@schatti
Copy link

schatti commented Nov 20, 2024

I experience the exact same behavior. I think the bug is on Line 27 in src/Commands/Taxonomy/NewTermLabel.cs where the SwitchParameter "IsDefault" is set to true.

@wilecoyotegenius
Copy link
Contributor

@TRACKSENS
You may add a synonym by issuing a following command:

New-PnPTermLabel -Name "City of Paris" -Lcid 1033 -Term myTermId -IsDefault:$false

I would not call this as a bug. What I may propose is an update to the documentation (to clearly indicate that without explicit value new term label becomes a default one).
Changing the code now to make IsDefault = false would be a breaking change for all scripts using this cmdlet.

wilecoyotegenius added a commit to wilecoyotegenius/powershell that referenced this issue Nov 22, 2024
@wilecoyotegenius wilecoyotegenius linked a pull request Nov 22, 2024 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

3 participants