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

api - CustomValue::get - add handling for comma separated return fields #12604

Merged
merged 2 commits into from
Jul 31, 2018

Conversation

tschuettler
Copy link
Contributor

Overview

The API call fails when using dirictly in API explorer:

GitLab Issue: https://lab.civicrm.org/dev/core/issues/296

Before

{
   "is_error": 1,
    "error_message": "'name' specified in OR group but not added to params"
}

After

    {
    "is_error": 0,
    "version": 3,
    "count": 2,
    "values": [
        {
            "entity_id": "203",
            "latest": "Edu",
            "id": "1",
            "0": "Edu"
        },
        {
            "entity_id": "203",
            "latest": "S",
            "id": "2",
            "0": "S"
        }
    ]
}

Has unit tests for variants of return definitions: array, comma-separated and list of return parameters.

Technical

Unit test testGetCustomValueReturnMultipleApiExplorer fails without 55000cc.

Comments

Not sure if the tests should be more verbose ...

@civibot
Copy link

civibot bot commented Jul 31, 2018

(Standard links)

@colemanw colemanw merged commit 58603fb into civicrm:master Jul 31, 2018
@colemanw
Copy link
Member

Makes sense; has tests :)

@tschuettler
Copy link
Contributor Author

Great! Can you/someone tidy up the issue and close it?

@tschuettler tschuettler deleted the 296-custom-value-return-field branch August 1, 2018 08:18
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.

3 participants