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

Manage Dimensions: Sorting by ID is not numeric #16473

Merged
merged 1 commit into from Sep 25, 2020
Merged

Manage Dimensions: Sorting by ID is not numeric #16473

merged 1 commit into from Sep 25, 2020

Conversation

nina-py
Copy link
Contributor

@nina-py nina-py commented Sep 25, 2020

For some reason custom dimension ids are passed around as strings, and there is at least one place in the plugin JS code where they are converted to integers as needed - perhaps there is a good reason to keep them as strings almost everywhere else. According to AngularJS documentation, a getter function or an expression can be used instead of a field to order by, so I have added a .parseInt() method so that the ids are sorted properly. The performance hit of that is minimal given there won't be hundreds, or even dozens of custom dimensions in a typical Matomo setup.

fixes #16155

@tsteur
Copy link
Member

tsteur commented Sep 25, 2020

Cheers @nina-py very appreciated 👍

@tsteur tsteur merged commit 9967583 into matomo-org:4.x-dev Sep 25, 2020
@nina-py nina-py deleted the issue-16155 branch September 25, 2020 03:24
@nina-py
Copy link
Contributor Author

nina-py commented Sep 25, 2020

No worries @tsteur!

@mattab mattab added this to the 4.0.0 milestone Sep 28, 2020
@mattab mattab changed the title Fixes #16155. Custom dimension ids now sorted as integers, not strings Manage Dimensions: Sorting by ID is not numeric #16155 Sep 29, 2020
@mattab mattab changed the title Manage Dimensions: Sorting by ID is not numeric #16155 Manage Dimensions: Sorting by ID is not numeric Sep 29, 2020
@mattab mattab added Bug For errors / faults / flaws / inconsistencies etc. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. labels Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Usability For issues that let users achieve a defined goal more effectively or efficiently.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Manage Dimensions: Sorting by ID is not numeric
3 participants