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#1366 Bypass nonfunctioning case audit interactive screen and go straight to report #15998

Merged

Conversation

demeritcowboy
Copy link
Contributor

Overview

This is a followup to https://lab.civicrm.org/dev/core/issues/1366 and #15882. The first part was to make the case audit report do what it originally did which is use the selected timeline when outputting the report. This second part bypasses the nonfunctioning interactive onscreen page you get which hasn't been functioning since 2015 when the associated javascript file was deleted. So the PR makes it go straight to the associated print report (currently the button on the onscreen interactive page).

The third part would be to eventually remove any code only used for the onscreen interactive page.

Before

Untitled

Choosing to run the audit report would take you to a screen that hasn't worked in years. Also even though the print button on that screen is back to mostly working it still isn't including all the right activities all the time.

After

Bypass nonfunctioning screen, go straight to report. Report includes all the right activities.

Technical Details

For the change in line 134 in CRM/Case/XMLProcessor/Report.php, it's less than it seems, because:

  1. As the added test fails without changing this line, it shows that this line isn't including enough activity types and so the second parameter needs to be TRUE. Since allActivityTypes is mostly an alias for the pseudoconstant call, the only real change here is making the second parameter TRUE to include all the activity types.
  2. Second, as noted in https://lab.civicrm.org/dev/core/issues/1433, the allActivityTypes function is weird and it would be nice to get rid of it. Since this line of code only ever executes when doing a case audit report, it seems a good place to start to try to replace calls to allActivityTypes.

Note also that if it's not obvious the CRM/Case/Form/Report.php file represents the popup options screen you get when you run the case audit report where you choose whether to redact etc, so all the lines being changed in this PR only touch the case audit report and nothing else.

Comments

@adam-devapp do you have some time to try this out?

@civibot
Copy link

civibot bot commented Dec 1, 2019

(Standard links)

@civibot civibot bot added the master label Dec 1, 2019
@eileenmcnaughton
Copy link
Contributor

@alifrumin @jitendrapurohit is this something one of you can test?

@alifrumin
Copy link
Contributor

jenkins retest this please

@alifrumin
Copy link
Contributor

alifrumin commented Feb 14, 2020

I can test this. I was able to recreate the workflow that is being reworked on local build (based on the explanation) and am rerunning jenkins I will test on the jenkins build when its finished.

@alifrumin
Copy link
Contributor

jenkins retest this please

@alifrumin
Copy link
Contributor

alifrumin commented Feb 14, 2020

I was able to test this on jenkins and it works as expected, you never see the "Case Activity Audit" screen.

@eileenmcnaughton I believe this is ready to be merged.

@demeritcowboy
Copy link
Contributor Author

Thanks @alifrumin. Good point about the docs - I don't think I've ever looked at that section. I can do a PR.

@eileenmcnaughton
Copy link
Contributor

Thanks @alifrumin !

@demeritcowboy
Copy link
Contributor Author

Added docs PR civicrm/civicrm-user-guide#428

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants