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

Added relationship active filter in CiviCRM Case reports. #12711

Merged
merged 1 commit into from
Oct 25, 2018

Conversation

jusfreeman
Copy link
Contributor

@jusfreeman jusfreeman commented Aug 22, 2018

Overview

CiviCRM's Case Reports are showing Cases in the report results even when a Contact has been removed from a Case Role. This is problem can be replicated on CiviCRM's Case Summary Report and Case Detail Report.

Investigation showed that there was no way to filter for the is_active flag on the role / relationship, and the reports do not currently check this field.

Solution is to add this field as a filter criteria to the reports in CiviCRM Core.

Before

Relationships which are inactive or active are included in the report results, which can cause confusion as previous Staff previously assigned Case Roles are still being listed. There is no filter available to remove inactive relationships to the Case.

This greatly reduces the usefulness of the report because it lists both Staff that are working on a Case and those that are no longer working on the Case in the same listing with no clear identification of each state.

After

An "Active Relationship?" filter has been added to the report which defaults to "Yes". Such that only relationships which are active are included in the report. Staff members assigned a Case Role will be listed. Staff members that are no longer assigned a Case Role will not be listed.

Technical Details

"Active Relationship?" filter has been added to the report which defaults to "Yes".

Comments

With the default being "Yes" to "Active Relationship?", previous report results for the Case Summary Report and Case Detail Report will change with this patch applied.

Ref: CIVICRM-965

@civicrm-builder
Copy link

Can one of the admins verify this patch?

@civibot
Copy link

civibot bot commented Aug 22, 2018

(Standard links)

@colemanw
Copy link
Member

@civicrm-builder add to whitelist

Copy link
Member

@colemanw colemanw left a comment

Choose a reason for hiding this comment

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

I've reviewed and tested this and it works as described. Agree it's a good bug fix. @jusfreeman do you have a sec to update with my nitpicks?

CRM/Report/Form/Case/Detail.php Outdated Show resolved Hide resolved
CRM/Report/Form/Case/Summary.php Outdated Show resolved Hide resolved
@agilewarealok
Copy link
Contributor

@colemanw thanks for the review, We've updated the PR as required.

@jusfreeman
Copy link
Contributor Author

@colemanw @eileenmcnaughton just a friendly ping to see if there was any other changes required for this PR prior to acceptance?

@eileenmcnaughton
Copy link
Contributor

@colemanw this is marked 'needs changes' by you but I believe those changes have been made

@eileenmcnaughton eileenmcnaughton dismissed colemanw’s stale review October 25, 2018 00:41

Comments have been addressed

@eileenmcnaughton
Copy link
Contributor

test this please

@eileenmcnaughton
Copy link
Contributor

I'm giving this merge-on-pass as @colemanw had previously tested & changes since then are only addressing code changes suggested by @colemanw

@eileenmcnaughton eileenmcnaughton changed the title CIVICRM-965: Added relationship active filter in CiviCRM Case reports. Added relationship active filter in CiviCRM Case reports. Oct 25, 2018
@eileenmcnaughton eileenmcnaughton merged commit 33717cb into civicrm:master Oct 25, 2018
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.

5 participants