Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C CiviCRM Core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,372
    • Issues 1,372
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • CiviCRM Core
  • Issues
  • #2831
Closed
Open
Created Sep 11, 2021 by David Hayes@dave

It is possible to break Scheduled Reminder by adding too may entity types

How to reproduce

  1. Add about 100 activity types
  2. Create a Scheduled Reminder that triggers on Activity
  3. Select most or all activity types
  4. Save Scheduled Reminder
  5. Edit the recently created Scheduled Reminder, notice not all Activity Types are selected anymore
  6. Scheduled Reminders will begin failing -Checking the Scheduled Job logs, the error will be Finished execution of Send Scheduled Reminders with result: Failure, Error message: Failed encoding non-numeric value (#selectedValues)

The cause

The selected activity types are stored in the civicrm_action_schedule table in the entity_value column. This column only supports 255 characters. Adding any more characters than this causes the value to be truncated with an elipsis "..." at the end. This error originates from CRM_Activity_ActionMapping::createQuery where the code places the trucated list of Activity Types into a where clause in a query. The "..." after the last value cause an integer check to fail.

How to fix

Convert this column to something longer? TEXT maybe? Happy to make a PR, but would like to know the preferred path.

Edited Sep 11, 2021 by David Hayes
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking