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

TaxonomyPicker retreiving the terms in the correct custom sort order #146

Closed
trillian74 opened this Issue Oct 5, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@trillian74

trillian74 commented Oct 5, 2018

When i retrieve the terms in a termsett they are sorted alphabetically, but i have applied them with custom sorted list that is defined using the Term Store Management Tool

Category

[ x] Enhancement

[ ] Bug

[x ] Question

Version

I'm using @pnp/spfx-controls-react": "1.9.0"

Expected / Desired Behavior / Question

I'd like the terms to be listed using the custom sort. Is there a way aleready in place or is it "missing"?

Observed Behavior

When i retrieve the terms in a termsett they are sorted alphabetically, but i have applied them with custom sorted list that is defined using the Term Store Management Tool

Steps to Reproduce

Add custom sort and review the listing. Its unchanged

@trillian74

This comment has been minimized.

trillian74 commented Oct 5, 2018

After reviewing /src/services/SPTermStorePickerService.ts i think i have a fix with a default where if the termSet has its CustomSortOrder property set then it will use that as the sort instead of the default sort.

// inside getAllTerms, need to check null on CustomSortOrder
term.SortOrderIndex = termStoreResultTermSet.CustomSortOrder.split(":").indexOf(this.cleanGuid(term.Id));

Then you'd have the SortOrderIndex on each term in the set and thus sort it based on the custom sort entered in the term management tool

I'm not that familiar to take part in open source development, but if you have some direction on how to contribute i'll happily share my fix.

Ole

@trillian74

This comment has been minimized.

trillian74 commented Oct 8, 2018

I've added some code to the dev. What is the process to get it release as @next or master? @estruyf

@estruyf

This comment has been minimized.

Collaborator

estruyf commented Oct 8, 2018

@trillian74 thank you very much, I will process this later this week.

@trillian74

This comment has been minimized.

trillian74 commented Oct 12, 2018

thx @estruyf i guess its not default that the contribution gets in, but when do i know if it get thru or not?

@AJIXuMuK

This comment has been minimized.

Contributor

AJIXuMuK commented Oct 12, 2018

If the PR is still open then @estruyf just hasn’t had time yet to process it. He’ll comment when it’s processed.

@estruyf estruyf added this to the 1.10.0 milestone Oct 15, 2018

@estruyf

This comment has been minimized.

Collaborator

estruyf commented Oct 15, 2018

Thanks @AJIXuMuK.

@trillian74 your PR has been merged and your changes will be available in version 1.10.0. You can already test it out in the beta: https://sharepoint.github.io/sp-dev-fx-controls-react/beta/

@estruyf

This comment has been minimized.

Collaborator

estruyf commented Nov 6, 2018

This is now available in version 1.10.0.

@estruyf estruyf closed this Nov 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment