-
-
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
Format details for case custom data activity in a human readable format #13365
Conversation
fe41f72
to
1afd762
Compare
@mattwire are you able to add a test of the new API i think that would be best here |
1afd762
to
6437dda
Compare
@jusfreeman @petednz would either of you folks be interested in reviewing this change |
@seamuslee001 yep I can do a review. |
@mattwire @seamuslee001 have tested this on 5.18.3 and saving a case with custom fields returns the following error with this PR applied.
|
@jusfreeman It relies on a "new" API call CustomValue.getdisplayvalue that was merged into 5.20 (#15335). The patch should apply cleanly to 5.18.3 if you're able to apply and test? |
@mattwire thanks
This patch did apply cleanly to 5.18.3 but does not work, I had checked the related PR #15335 and it appeared that it had been merged with 5.18.3 but I can see in the code now that this is not the case. Honestly, I find it really confusing to identify which version a PR should be applied too, there's no obvious indicators on the PR itself and I have to dig around Github history or simply download the code and see if it exists. It would be really helpful for reviewers to know which version a PR should be tested against - this would save review time and effort (avoid frustration), and importantly, avoid incorrect test results. Testing results on 5.20.alpha1. Before PR applied, results are JSON output. Before PR applied, results are human-readable output. No errors in CiviCRM log. Looks OK to me, thanks @mattwire Agileware Ref: CIVICRM-1335 |
Merging as per @jusfreeman 's testing |
@seamuslee001 going forward, can you add a label to identify which version this PR and others apply too? That would be helpful. |
Overview
When a Case "Change Custom Data" activity is created the activity details are virtually unreadable to a human! It is a json encoded array of all previous custom data values with their internal names (eg. custom_55).
This PR changes that so that only the actual changes are shown and the custom field labels are used.
Before
"Unreadable" json array of all custom data values before change:
After
Technical Details
A new function is created to format the custom data for the activity.
Comments