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#2509 - Remove duplicate setting of activity subject field and replace a few CRM_Utils_Array::value #20114

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

demeritcowboy
Copy link
Contributor

Overview

Similar to #20106 my end goal is to pull out the bit that makes the action links to make it reusable. This smaller simplification will make it easier to see later that all I'll be doing is moving some code into its own function.

Before

Subject is set to the same thing it's already set to on line 2521 near the start of the loop.
Some use of CRM_Utils_Array::value.

After

No double-setting of subject.
CRM_Utils_Array::value replaced.

Technical Details

Comments

You can verify subject is already set by:

  1. Create a case.
  2. Fill in some subjects on the autopopulated activities to make it obvious what the subject is, otherwise they'll be blank in step 4 which will be disconcerting.
  3. Under Admin - CiviCase - CiviCase settings, turn on the option for "Include case activities in general activity views".
  4. Visit the client contact's activity tab. The activities from the case you created will show the subject.

@civibot
Copy link

civibot bot commented Apr 21, 2021

(Standard links)

@civibot civibot bot added the master label Apr 21, 2021
@colemanw
Copy link
Member

👍 sensible code cleanup

@colemanw colemanw merged commit 5a74121 into civicrm:master Apr 21, 2021
@demeritcowboy
Copy link
Contributor Author

Thanks!

@demeritcowboy demeritcowboy deleted the simplify-actionlink2 branch April 21, 2021 18:04
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.

2 participants