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

PCHR-2527: Allow custom options to be passed to API calls #2085

Merged

Conversation

igorpavlov-zz
Copy link
Contributor

@igorpavlov-zz igorpavlov-zz commented Aug 22, 2017

Overview

Currently the api.getAll() function ignores custom options passed as a filter. This PR allows to use custom options in the getAll() function.

Technical Details

// The OR expression can now be used, for example
api.getAll(entity, {
  options: { or: [['field1', 'field2', 'field3']] }
});

Comments

This PR is needed to accomplish #2084.

Please see this PR civicrm/civicrm-core#9844 for the reference to the OR operator support in CiviCRM.


  • Tests Pass

api.getAll(entity, {});
});

it('default options are still used in the API call', function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description of the test should make a sentence with it.
Example: it - "still uses the default options in the API call".
Please check other instances.

@igorpavlov-zz igorpavlov-zz merged commit 2fc1c05 into staging Aug 22, 2017
@igorpavlov-zz igorpavlov-zz deleted the PCHR-2527-allow-custom-options-to-be-passed-to-api branch August 22, 2017 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants