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

CRM-20733 - Relationship report improvements #10679

Merged
merged 2 commits into from
Aug 3, 2017

Conversation

yashodha
Copy link
Contributor

@yashodha yashodha commented Jul 17, 2017

if (empty($whereClauses)) {
$this->_where = 'WHERE ( 1 ) ';
$this->_having = '';
$this->_where = "WHERE ( {$this->_aliases['civicrm_contact']}.is_deleted = 0 AND {$this->_aliases['civicrm_contact_b']}.is_deleted = 0 ) ";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Edzelopez @colemanw what do you think of this. I took a look at a few other reports & they weren't filtering out deleted contacts. I kind of feel like if we want them filtered out the generated ACL clause should be doing that for all reports?

Overall PR looks good, just trying to think it through WRT report ACL work that has been happening

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this remove the conditional?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always empty at that point I think

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just ran into the is_deleted issue (trashed contacts were displaying in the report) and was going to file a PR, but see this already addresses it. The assumption throughout Civi is that trashed contacts are excluded unless options are explicitly provided to display them. I think the same should hold true here. Either add a filter option to include/not include trashed contacts, or hard code their exclusion.

Personally, I think that although a filter option wouldn't hurt, it isn't necessary unless there's specific demand.

@eileenmcnaughton
Copy link
Contributor

I feel like this has had an amount of review appropriate to the nature of the change & @lcdservices makes a good case on the is_deleted. Merging

@eileenmcnaughton eileenmcnaughton merged commit 33617f7 into civicrm:master Aug 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants