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#3838 - Addressee token evaluates middle_name as literal string null #24513

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

demeritcowboy
Copy link
Contributor

Overview

https://lab.civicrm.org/dev/core/-/issues/3838

aka Restore string "null" handling when processing greetings

Before

  1. Create a contact with a blank middle name.
  2. Look at the addressee display in the communication prefs section on contact summary: "John null Smith"

After

Better

Technical Details

Previously it used to call DAO::storeValues which does a check for string "null", but the reason it was changed was because it was completely bypassing them. So this restores handling, but converts it to null null.

Comments

I had trouble writing a test for this because it seems to depend a little on the form. It wasn't clear why though, and then I gave up.

@civibot
Copy link

civibot bot commented Sep 14, 2022

(Standard links)

@civibot civibot bot added the master label Sep 14, 2022
@demeritcowboy demeritcowboy changed the title dev/core#3838 - Addressee token evalutes middle_name as literal string null dev/core#3838 - Addressee token evaluates middle_name as literal string null Sep 14, 2022
@colemanw colemanw merged commit a220b37 into civicrm:master Sep 14, 2022
@colemanw
Copy link
Member

Well, at least you tried to write a test. That counts.

@demeritcowboy demeritcowboy deleted the null-middle branch September 14, 2022 21:39
@demeritcowboy
Copy link
Contributor Author

Thanks!

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