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

dev/core#2285 Fix civicrm_alterReportVar hook for contribute detail r… #19317

Merged
merged 1 commit into from
Apr 5, 2021

Conversation

ahed-compucorp
Copy link
Contributor

Overview

The civicrm_alterReportVar is not working for contribute detail report.

Before

We're getting a "DB Error: no such field" when using the hook.

After

No Errors.

Technical Details

Here at Detail.php#L956 our changes to the _form attribute are lost and the error will be fired here Detail.php#L576

Unknown column 'some_table.some_column' in 'where clause'

Comments

Maybe it is not a good idea to fire the same hook twice so I am open to suggestions.
Adds test cover.

Issue: https://lab.civicrm.org/dev/core/-/issues/2285

@civibot
Copy link

civibot bot commented Jan 4, 2021

(Standard links)

@civibot civibot bot added the master label Jan 4, 2021
@eileenmcnaughton
Copy link
Contributor

In general I think this hook is highly flakey since the code could change and the hook might not always be able to interact in this same way. I always recommend people write their own report rather than use this hook to customise an existing one. However, I'm rather swayed by the included test on this specific PR.

I also note that the hope is to start to move away from these reports in favour of search-kit

@eileenmcnaughton eileenmcnaughton merged commit 7901585 into civicrm:master Apr 5, 2021
ahed-compucorp added a commit to ahed-compucorp/civicrm-core that referenced this pull request Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants