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

APIv4 - Automatically coalesce potentially null field values in equations #21647

Merged
merged 1 commit into from
Sep 28, 2021

Conversation

colemanw
Copy link
Member

Overview

Follow-up to #21551
Fixes APIv4 SQL Equations to treat null values as 0.

Before

Any null value would return null for the entire equation.

After

Null values treated as 0.

@civibot
Copy link

civibot bot commented Sep 27, 2021

(Standard links)

@civibot civibot bot added the master label Sep 27, 2021
@colemanw
Copy link
Member Author

@eileenmcnaughton this is a fairly simple solution to what we talked about.

@eileenmcnaughton
Copy link
Contributor

@colemanw these 2 test fails relate

api.v4.Action.ContactApiKeyTest.testGetApiKey
api.v4.Action.SqlExpressionTest.testSelectEquations

@eileenmcnaughton
Copy link
Contributor

test this please

@eileenmcnaughton
Copy link
Contributor

As use cases go this is a bit weak - but it worked

image

@eileenmcnaughton eileenmcnaughton merged commit 3c04c00 into civicrm:master Sep 28, 2021
@eileenmcnaughton eileenmcnaughton deleted the coalesce branch September 28, 2021 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants