-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
core#1623: My Case dashlet doesn't sort by name but contact_id instead #16647
Conversation
(Standard links)
|
Thanks @monishdeb looks good. I see some unrelated errors for other columns but it's separate.
|
@monishdeb the actual fix is fine but check the ExportTest for our new (cool) way of handling civiexit in unit tests - we aren't doing stuff like
anymore see in CiviExit
|
2701916
to
377eb79
Compare
Thanks @eileenmcnaughton for pointing that out. It helped me to avoid tweaking the core AJAX fn. But to still capture the output I need to bring some modification. I have assigned the output as an error data of |
@@ -136,6 +136,113 @@ private function assertCasesOfUser($loggedInUser, $caseId, $caseCount) { | |||
$this->assertEquals($caseCount, count($caseRoles), 'Total case roles for logged in users must be ' . $caseCount); | |||
} | |||
|
|||
/** | |||
* core/issue-1623: My Case dashlet doesn't sort by name but contact_id instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you use an IDE - phpstorm highlights the need to declare the exception here - * @throws \CRM_Core_Exception
@monishdeb I think you missed something off your commit - maybe
|
or perhaps
|
argh.. It was in my unsaved changes :( Seems like I need to change my IDE to phpstorm from Atom |
:-) |
@monishdeb my first thought was the change you made but I wonder if is better - because i happens before messing with headers & echo |
lol snap |
Yup I agree, already updated :) Few more lines is always better than avoiding unnecessary process(es). |
@monishdeb something still wrong with the test |
Overview
My Case dashlet doesn't sort by name but contact_id instead
Steps to replicate:
Before
After
Expected behaviour : As you can sort by 'Contact' doesn't consider the name. Internally it is sorted by contact ID which is not correct, which should be by sort name.
Technical Details
The fix is in core BAO fn and its been called in various places in codebase:
Checked the impact of changing the key from contact_id to sort_name on each case and its safe.