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

[FEATURE] Export-PnPTermGroupToXml and Import-PnPTermGroupFromXml do not respect order of Terms. #3810

Open
Ron-Rohlfs opened this issue Mar 5, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Ron-Rohlfs
Copy link

Is your feature request related to a problem? Please describe.
We want the Terms to appear in a specific order within their TermSets.
We manually created a TermSet with Terms in a specific order (see Source Hour TermSet.png).

Source Hour TermSet

The Export-PnPTermGroupToXml and Import-PnPTermGroupFromXml commands resulted in the Terms being ordered alphanumerically (see Target Hour TermSet.png).

Target Hour TermSet

Export-PnPTermGroupToXml creates an output file that disregards the source Term order an reorders the Terms alphanumerically within the .xml file (see UtilitiesTermGroup.xml.png).

UtilitiesTermGroup xml

If the xml file is manually edited to put all the pnp:Term elements in the desired order, the Import-PnPTermGroupFromXml command still disregards the ordering and results in an alphanumeric order in the target tenant (see Target Hour TermSet.png above).

Describe the solution you'd like
We would like the source TermGroup to be faithfully replicated on the target tenant including the order of Terms within each TermSet.

Describe alternatives you've considered
We tried manually setting the order in the Export-PnPTermGroupToXml output file as described above.

Additional context
Add any other context or screenshots about the feature request here.

@Ron-Rohlfs Ron-Rohlfs added the enhancement New feature or request label Mar 5, 2024
@Ron-Rohlfs
Copy link
Author

The ordering can be manually updated through the browser using /sites/< shorturl >/_layouts/15/termstoremanager.aspx?RedirectToModernExperience=false. However, it would be nice to see the ordering preserved in the commands.

@wilecoyotegenius
Copy link
Contributor

I have just tried to reproduce the problem and I was unable to do so.
I have created a term group and a term set with similar terms as you have in your screenshots. I have set custom sort on a term set level.
When I execute Export-PnPTermGroupToXml, custom sort is getting preserved (please note CustomSortOrder property on terms below). Same thing with Import-PnPTermGroupToXml - terms are getting correctly imported, taking custom sort into account.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants