Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • R resendmailing
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Extensions
  • resendmailing
  • Merge requests
  • !8

Fix ResendMailing angularJS (expected one mailing, could not find valid email)

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open bgm requested to merge bgm/resendmailing:fixAngular into main Dec 12, 2022
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 1

In CiviCRM 5.55 (we were previously on 5.49), we started seeing odd issues, where using the Resend Mailing feature threw one of these errors:

  • Failed to find a suitable email for Contact
  • Expected to find one Mailing record, but there were zero

The second error was thrown by code in !5 (closed), but it wasn't the root of the issue.

The root was that AngularJS was sending the entire object instead of just the ID, and changing the ng-options (in this MR) fixes the bug.

I have to admit that I'm not sure why this bug would surface here, and if we're the only ones who ran into it. @larssg, is this a feature that you use?

Also I did cheat a bit in the MR, and added the date in the list of mailings, because it's difficult otherwise to find the mailing. I know it does not respect the locale/date-format, but it is ISO-8601-1 (and not the same format as in !7), but it's a quickfix and helps a ton (I considered removing the time, but this particular clients sends a lot of targeted mailings, having the time-of-day helps).

image

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fixAngular