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

Fixes to Contact Detail report #12772

Merged
merged 3 commits into from
Sep 13, 2018

Conversation

pradpnayak
Copy link
Contributor

@pradpnayak pradpnayak commented Sep 4, 2018

Overview

selectWhereClause() hook breaks when trying to add clause for contact table.
https://lab.civicrm.org/dev/core/issues/376

Before

DB Error: no such field [nativecode=1054 ** Unknown column 'relationship_civireport.contact_id_a' in 'where clause']"]

After

No DB error

Technical Details

@totten totten added the master label Sep 5, 2018
@eileenmcnaughton
Copy link
Contributor

@pradpnayak the issue occurs only when a hook is in play? Are you able to add a test on this?

@eileenmcnaughton eileenmcnaughton added the sig:extension support Supports being able to integrate extensions with CiviCRM label Sep 7, 2018
@eileenmcnaughton
Copy link
Contributor

I've worked my way through this & most of the changes are just removing unused cruft. The significant change is not passing the component clauses out to the hook - as they are not used in the main query & can result in fatal errors. I was able to replicate the issue in a test which I will submit.

@eileenmcnaughton
Copy link
Contributor

test this please

@eileenmcnaughton
Copy link
Contributor

@pradpnayak test fails are style related. Also, my unit test is merged I think so you could remove the line that skips this report as part of this PR & hence add testing with it

@pradpnayak
Copy link
Contributor Author

Thanks @eileenmcnaughton

I have pushed the changes. Can you please have a look?

@eileenmcnaughton
Copy link
Contributor

looks good @pradpnayak

@eileenmcnaughton eileenmcnaughton merged commit 71ba8cb into civicrm:master Sep 13, 2018
@pradpnayak pradpnayak deleted the DetailContactReport branch September 17, 2018 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master merge on pass sig:extension support Supports being able to integrate extensions with CiviCRM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants