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 - Fix calculated fields in bridge entities #20908

Merged

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Jul 20, 2021

Overview

Fixes a crash-inducing bug in the use of calculated fields on a bridge entity, such as RelationshipCache.is_current which prevented this in SearchKit:
image

Before

Test fails, search crashes

After

Test passes, search works

Technical Details

It's complicated, trust the unit tests.

@civibot
Copy link

civibot bot commented Jul 20, 2021

(Standard links)

@civibot civibot bot added the master label Jul 20, 2021
Fixes a crash-inducing bug in the use of calculated fields on a bridge entity,
such as RelationshipCache.is_current.
@colemanw colemanw force-pushed the fixApiCalculatedBridgeFields branch from 8bff972 to 138158b Compare July 20, 2021 16:30
@colemanw
Copy link
Member Author

Huh. I'm surprised is_current returns anything if there isn't a relationship. Must be because it's a calc field. Let's open a separate issue for that.

@eileenmcnaughton
Copy link
Contributor

@colemanw OK - I'll merge this & let you check that one out separately

@eileenmcnaughton eileenmcnaughton merged commit 994ffc8 into civicrm:master Jul 20, 2021
@eileenmcnaughton eileenmcnaughton deleted the fixApiCalculatedBridgeFields branch July 20, 2021 23:34
@Anatoleallain
Copy link

Looks good to me

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.

3 participants