-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
dev/core#934 Fix regression on sorting activity tab by 'Added by' #14194
Conversation
(Standard links)
|
api/v3/Activity.php
Outdated
if (in_array(['source_contact_name', 'source_contact_name desc', 'source_contact_name asc'], $options['return'])) { | ||
$sql->join( | ||
'source_contact', | ||
'!joinType civicrm_activity_contact !alias ON (!alias.activity_id = a.id AND record_type_id = ' . CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_ActivityContact', 'record_type_id', 'Activity Source') . ')', |
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.
this isn't right yet
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.
needs to be a subquery with min or max around display name I think
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.
nope just checked & the UI only supports source contact - which is a one to one so simple join is fine
ac7df61
to
1aec416
Compare
472e1e2
to
beb8974
Compare
@@ -592,7 +586,6 @@ public function testGetActivitiesforContactSummary() { | |||
'activity_type_id' => NULL, | |||
'offset' => 0, | |||
'rowCount' => 0, | |||
'sort' => NULL, |
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.
I removed this by accident but I think it might not be a bad thing as it ensures enotices don't get thrown
beb8974
to
ea1f17a
Compare
ea1f17a
to
a6c2ebd
Compare
This updates a line which was added in the past day (civicrm#14194) to ensure that the data is escaped.
This updates a line which was added in the past day (civicrm#14194) to ensure that the data is escaped.
Overview
Fixes regression whereby source_name no longer sorts due to api not supporting it (yet)
Before
After
works
Technical Details
Note that handling target_name or assignee_name introduces a tonne of complexity due the 1->N relationship - ug. In the UI sort_name & target_name are sortable
Comments
Actually the PR doesn't even fix it yet :-(