Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 933
    • Issues 933
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #1590

Closed
Open
Opened Feb 12, 2020 by JonGold@JonGoldDeveloper

Scheduled reminder: "Additional recipients" receive reminders under circumstances where they ought not to

This is a superset of event#28 (closed). The issue seems to be more generalized than I'd realized.

"Additional recipients" will receive reminders on events (and presumably other entities) that have been deleted. To test:

  • Create a scheduled reminder for an existing event.
  • Under Limit or Add Recipients, select Also Include and add a group or contact(s).
  • Delete the event.
  • Run the scheduled reminders job.

Expected result No scheduled reminder.

Actual result Scheduled reminder to the "additional recipients".

Why it happens

Scheduled reminder recipients are decided in two passes. First, whomever qualifies by the "normal" criteria (e.g. event participants) and a second pass for anyone in "Additional Participants".

The first pass is specific to the type of reminder (event, membership, contribution); the second is the same code regardless. This caused event#28 (closed); the "additional recipients" pass, by virtue of not being event/membership/etc-specific, wasn't aware that events have the special case of templates, which other entities don't. It also doesn't check for deleted entities.

The solution is to add a new method to the Civi\ActionSchedule\MappingInterface interface - a sendToAdditional method that returns a boolean. Then, each class that implements this interface can abort the "additional recipients" pass in an entity-specific way. Besides deleted entities and event templates, contributions have templates as well now, so we should check for that.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#1590