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

[Regression] campaign name no longer accepted #19633

Merged
merged 1 commit into from
Feb 22, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Feb 19, 2021

Overview

In master we removed the pseudoconstants on campaign_id fields with the intent they would rely on the FKs.

This adds a shim for APIv3 to maintain legacy support for getoptions on fields named campaign_id.

@civibot
Copy link

civibot bot commented Feb 19, 2021

(Standard links)

@seamuslee001
Copy link
Contributor

First test fail looks related and expected

@colemanw
Copy link
Member

Right. APIv3 will no longer accept campaign name in place of the id.
The fix is to update your WMF code to pass campaign id instead of campaign name to the api.

@mattwire
Copy link
Contributor

I can see this causing unexpected breakage elsewhere too. At the very least I think this breaking change to API3 needs to be flagged in the release notes and a pre-upgrade message.

@eileenmcnaughton
Copy link
Contributor Author

@colemanw I think we have to find a way to handle this in the apiv3 code - even if it is hacky

@eileenmcnaughton
Copy link
Contributor Author

@colemanw I am guessing the test fails might be due to unique_name vs name_name

CRM_Core_BAO_ActionScheduleTest::testInheritedMembershipPermissions
Failure in api call for relationship create: '30' is not a valid option for field campaign_id
#0 /home/jenkins/bknix-dfl/build/core-19633-773vc/web/sites/all/modules/civicrm/CRM/Contact/BAO/Relationship.php(2383): civicrm_api3('Membership', 'create', Array)

@colemanw
Copy link
Member

@eileenmcnaughton the test fail was because I forgot my v3 syntax and typed 'limit' => 0 instead of 'options' => ['limit' => 0] so the list was truncated. Yet another victim of the v3 "limit 25" problem, and a good thing tests caught it.

@eileenmcnaughton
Copy link
Contributor Author

@colemanw nice

@colemanw colemanw merged commit ccc1c28 into civicrm:master Feb 22, 2021
@colemanw colemanw deleted the campaign branch February 22, 2021 03:59
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.

4 participants