Skip to content
Snippets Groups Projects

fix activity links in contact action menu

Merged JonGold requested to merge JonGold/activitytypeacl:570-activity-links into master

In Civi 5.70+, the "Send an Email" item is missing from the action menu on a contact (see attached screenshot).

That's because the code I deleted in this MR is comparing the actions generated by CRM_Activity_Form_ActivityLinks::commonBuildQuickForm() with those generated by CRM_ActivityTypeACL_BAO_ACL::getPermissionedActivities. However, this commit in core PR #27973 changes how the first function returns values. So we're comparing the "Email" label against the "Send an Email" label. I can see that the "Send an Email" label existed prior to #27973, so this may not have worked earlier either.

However, #27973 also provides us with an easy solution. The activity type list is now generated via API4 without permissions ignored. So we no longer need to take any special action in hook_civicrm_buildForm - the activity links are generated correctly regardless.

It seems likely that #27973 is the first step toward using Activity::getLinks() elsewhere in the codebase, but for now, it's only used here.

In short

  • If you have this extension enabled in an up-to-date Civi, you won't get "Send an Email".
  • But also if you have an up-to-date Civi, removing the code in this MR won't expose activity types someone lacks access to, so removing this code fixes the missing "Send an Email" and simplifies the extension.

Selection_2287

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading