-
-
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
dev/core#1710 Ensure that civicrm_case_activity is properly populated… #17128
Conversation
(Standard links)
|
215f744
to
eaf5879
Compare
The patch fixes the issue, but I am not confident about the buildQuery() fix made. I feel the placement of |
I think I agree with @monishdeb and I kinda remember looking at moving it to construct() when I did a quickie-fix in #16393, but I think the problem was that the filter wasn't defined yet at that point. But maybe I was missing something, like the JOINs you're suggesting. |
Thanks for writing this! I tested this PR out and it does indeed solve the problem. I also agree that ( civicrm-core/CRM/Report/Form/Activity.php Lines 300 to 304 in eaf5879
Any thoughts on just replicating this? My thought is it should work to just add:
here so the alias is always populated whether the filter is called for or not. |
@seamuslee001 I think this should also target the rc? |
eaf5879
to
da8931d
Compare
@demeritcowboy @elisseck @monishdeb I have move the code around a bit as suggested can you test and as per @eileenmcnaughton i have now targeted this against the RC |
Thanks! I gave it a spin:
|
da8931d
to
aea388f
Compare
thanks @demeritcowboy I have fixed the hiding of that case_id column as it doesn't seem it should be exposed |
@demeritcowboy has reviewed this so MOP |
I reviewed it without the extra added line which I'm not sure exactly what it does. I was going to just do another run. |
Actually I think I might have missed something the first time. Can you remove merge-on-pass? What's happening is that the activity links are now the regular activity links, not case activity links, which was what the original PR was about that led to the earlier paging problem. |
done |
If I make this change to your current patch it mostly seems to work, just with a weird display glitch on the columns tab where if you've selected case activities then sometimes the columns tab has case id as a field but you can't select it and it's unchecked but then shows in results anyway. But other than the unselected checkbox it's not wrong, and if you've filtered to see case activities it's useful to see case id. --- a/CRM/Report/Form/Activity.php
+++ b/CRM/Report/Form/Activity.php
@@ -356,7 +356,7 @@ class CRM_Report_Form_Activity extends CRM_Report_Form {
protected static function addCaseActivityColumns($columns) {
$columns['civicrm_case_activity']['fields'] = [
'case_id' => [
- 'no_display' => TRUE,
+ 'title' => ts('Case ID'),
'required' => TRUE,
'dbAlias' => $columns['civicrm_case_activity']['alias'] . '.case_id',
],
@@ -731,9 +731,7 @@ GROUP BY civicrm_activity_id $having {$this->_orderBy}";
}
if (!empty($this->_params['include_case_activities_value'])) {
- $columns = self::addCaseActivityColumns($this->_columns);
- $this->_nonDisplayFields[] = 'civicrm_case_activity_case_id';
- $this->_columns = $columns;
+ $this->_columns = self::addCaseActivityColumns($this->_columns);
}
// @todo - all this temp table stuff is here because pre 4.4 the activity contact |
aea388f
to
542e4b7
Compare
@demeritcowboy I have made that change now can you check |
… for use by report query when run in force mode Move table definition into constructor to set alias using standard ways and only rely on the code in the buildQuery to add in the case_id column as necessary Fix hiding of case_id column Update to include Case ID column
542e4b7
to
07d4be2
Compare
Thanks. Looks good. For the purpose of getting the main issues to work they all seem to work. The test fail is one of those intermittent ones. |
Included in CiviCRM 5.25.0 PR: civicrm#17128
Included in CiviCRM 5.25.0 PR: civicrm#17128
… for use by report query when run in force mode
Overview
The civicrm_case_activity table and columns were being added to _columns array via the preProcess, for most cases this was ok however in dashlets and when clicking the view results mode this was problematic as in force mode (force=1) the preProcess is not executed
Before
DB Syntax Error when running report with include case activities set to true and run in force mode
After
No DB Error
ping @monishdeb @eileenmcnaughton @elisseck