-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Add CiviCase option for showing case activities in normal views #16360
Add CiviCase option for showing case activities in normal views #16360
Conversation
(Standard links)
|
A couple notes:
|
THanks for your comments @demeritcowboy
|
In case it wasn't clear from my zillions of commits just now:
|
@artfulrobot I think we'd better get unit tests here - this is exactly the sort of thing we have trouble maintaining because someone makes a change & it gets tested with the setting on but doesn't notice it breaks something with the setting off (which is why I push back a lot on settings). I kind of feel like 'show all' should be the default & 'only show in cases' should be added by an extension - which is why I'm open to adding a setting in core but to make it robust we need test cover - existing tests in CRM_Activity_BAO_ActivityTest should be a good starting point |
@artfulrobot +1 for this. I already implemented it quite a long time ago in the fastactivity extension that I co-wrote: https://github.com/systopia/de.systopia.fastactivity - worth a look to see how I did it :-) One of the things I added was an optional column that showed the case ID - this made it much easier to see which activities were on a case (and to access the case directly). |
To clarify about making it the default - you're talking new installs? On an existing install the typical case manager will now suddenly have thousands of activities showing on their activity tab that mostly aren't assigned to them. Also a technote if you're hiding the File On Case link for existing case activities you'll also need to hide it on the view form. |
@demeritcowboy no - I'm not saying to change the default - it can default to no change - |
Thanks everyone for the feedback, really helpful. I'll take a look at fast activities, Matt, although I'd probably avoid adding a column since people's screens stopped getting wider when FHD arrived! |
7ea29c0
to
9aad941
Compare
Hi @artfulrobot can you add WIP to the title if you're still working on it? The |
@demeritcowboy hmmm I've added WIP for now, but I thought it was ready.
Thanks :-) |
Thanks - if you visit the latest test site here and go to any manage case screen the array to string messages come up. And yes the conformance one is coming up semi-regularly on other PRs. |
Think I've found the array to string issue - there was a second place in the original code that needed changing. Fingers crossed for passing tests...! |
Fixed the array to string nonsense. But not looked at this yet:
Has tests now; I added checks to half a dozen of the existing tests for the case where the new setting is set. If you're happy can you remove the needs-tests tag? |
OK, I think this looks good to me now, I've removed "WIP" from title. Let me know if you'd like this rebased and / or squashed. |
Some notes so far. I'm not sure if you'd prefer to get everything at once later, or comments as they come up.
I'm not sure editing the regular activity.tpl is the best way to do this. This topic touches on what I meant earlier by "duplication of case functions on the activity tab".
The tests are great just some syntax notes:
|
Thanks again for your work, @demeritcowboy ! "WIP" is back on the title. I had not appreciated that case activities had a different menu link TBH, but that's clear now, I'll work on that.
|
a9c7256
to
bb7bc26
Compare
@demeritcowboy I think I've addressed the points you raised. The links shown in the activity selector are now the case-specific ones as follows
(the failing test is that conformance one that keeps popping up at random) |
@demeritcowboy yes, in looking through the activity code, I have a raft of cleanups to suggest (would be separate PR). There's a lot of mess, inefficiency, variables that are assigned but never referenced and plain ol' weirdness in there - I guess from years of piecemeal additions without tests. I've set ctx to a ZLS. |
2aa174b
to
5ceafa2
Compare
@demeritcowboy how's this looking to you now? Be nice to get it merged if everyone is happy, but perhaps you have more to add? Thanks for your work on this and no rush if you're busy. |
Hi I looked a little more this weekend and plan to finish this week. Note the patch doesn't apply cleanly because of the upgrade script commits but I was able to fudge it. Up to you if you want to squash/rebase now or wait just in case. |
Ok I have a mixed review but mostly good. There is one permissions question that is the main thing I see.
|
@demeritcowboy thanks so much for your well thought out contents, much appreciated. I'll take a good look through. |
5ceafa2
to
0013bff
Compare
Thanks again for the feedback. Here's a re-roll and some explanation. New commits
|
Thanks for the detailed explanation. You've put a lot of work into this. I just have some final technicalities and then I'm done:
|
0013bff
to
15925dc
Compare
Different aproach to tackling civicrm#16353 Fix array-to-string notice; Improve activity action links remove upgrader - as per Pradeep's suggestion update version added tweak way description is gotten update activity tests to check civicaseShowCaseActivities setting Fix another array-to-string conversion error Remove File On Case from activity View; add Manage Case fix case activity links when using caseShowCaseActivities remove ctx parameter for case activity links various US-Englishized Case settings texts. fix permission name
15925dc
to
3e120a6
Compare
Thanks again @demeritcowboy I've made those changes. |
Thanks looks good. |
@demeritcowboy do you want me to merge this now? |
@eileenmcnaughton Sure. |
Overview
Provides a setting controlling whether activities that belong to cases are visible outside of cases.
Before
If I have a case and add an activity, assigning a contact or two. Those contacts cannot see the activity on their contact record. Therefore the activity listing is incomplete and unclear.
After
Technical Details
Please see discussion below.
Comments
The following come from Pradeep and Demerit (thanks!) from https://civicrm.stackexchange.com/q/34407/35