mirror of
https://github.com/SuiteCRM/SuiteCRM.git
synced 2026-03-02 19:16:58 -05:00
Incorrect sorting of records #4539
Labels
No labels
Area: API
Area: Campaigns
Area: Cases
Area: Clean Up
Area: Clean Up: Performance
Area: Dashlets
Area: Databases
Area: Developer Tools
Area: Elasticsearch
Area: Elasticsearch
Area: Emails
Area: Emails:Campaigns
Area: Emails:Cases
Area: Emails:Compose
Area: Emails:Config
Area: Emails:Templates
Area: Environment
Area: Installation
Area: Language
Area: Mobile
Area: Module
Area: PDFs
Area: PHP8
Area: Reports
Area: Studio
Area: Styling
Area: Upgrading
Area: Workflow
Area:Activity Stream
Area:Calls
Area:Import
Area:Projects
Area:Search
Area:Surveys
Area:Themes
Area:Users
Branch:Hotfix
Good First Issue
Hacktoberfest
Help Wanted
PR:Community Contribution
PR:Type:Enhancement
Priority:Critical
Priority:Important
Priority:Moderate
Severity: Major
Severity: Minor
Severity: Moderate
Status: Requires Code Review
Status: Requires Updates
Status: Stale
Status: Team Investigating
Status:Assessed
Status:Fix Proposed
Status:Needs Assessed
Status:Requires Automated Tests
Type: Bug
Type:Deprecated
Type:Discussion
Type:Duplicate
Type:Invalid
Type:Question
Type:Suggestion
Type:Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SuiteCRM-SuiteCRM#4539
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Yousuf-Said on GitHub (May 25, 2021).
Issue
o The list of records is sorted in ascending order, but the sorting icon tip shows “Sorted Descending” or vice versa




Expected Behavior
The accounts list is sorted Ascending by City. The sorting icon next to City header shows 'Sorted Ascending'
Actual Behavior
The list of records is sorted in ascending order, but the sorting icon tip shows “Sorted Descending” or vice versa
Possible Fix
Steps to Reproduce
2.Click City column
These steps can also be repeated for other screens and other columns.
Context
Medium
Your Environment
@verbeckii commented on GitHub (May 26, 2021):
hi
I also have this bug
and there is another behavior for me - need double click on the sorting column
the first click just re-render to correct shows “Sorted Descending” and the second click does resorting all listview results
@SuiteBot commented on GitHub (Jul 29, 2021):
This issue has been mentioned on SuiteCRM. There might be relevant details there:
https://community.suitecrm.com/t/order-by-issue-with-leads/80039/2
@tsmgeek commented on GitHub (Jul 29, 2021):
I can explain why sorting by
Statusdoes not work as expected.Internally the
Statusfield is stored as follows, its to parts<state>_<substate>just as a reference, then on display this is translated using the language files, sorting is happening on the DB which knows nothing about the language.If you just want to sort between
Open/Closedthen use theStatecolumn, notStatus.I suspect when you sort by a related field its doing it on the
idhence why it does not seem right, also watch out when sorting on text fields that may have spaces at the start as the DB will treat these differently.@verbeckii commented on GitHub (Jul 29, 2021):
@tsmgeek
thanks for explaining it make sense
but the sorting works incorrect in all other fields in my case e.x data_created, data_modified, name...
any fields I wanted to sort works correctly only with a double click on the sorting...