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

Fix dev/core#4104 - APIv4 autocomplete for contributions #25485

Merged
merged 1 commit into from
Feb 2, 2023

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Feb 1, 2023

Overview

Fixes the bug from https://lab.civicrm.org/dev/core/-/issues/4104

Before

Contribution Autocomplete fails.

After

image

@civibot
Copy link

civibot bot commented Feb 1, 2023

(Standard links)

@civibot civibot bot added the 5.58 label Feb 1, 2023
@larssandergreen
Copy link
Contributor

Thanks Coleman. I've tested, works as it should in general.

I think the select2 should list the Contribution ID. Otherwise, you're kind of in the dark as a user if you're looking for a specific ID. We do show the ID for Contact ID.

Similarly, I don't think including the amount in the fields searched makes sense (if you're looking for Contribution ID 100 and you end up with a bunch of results for $100 contributions). Small detail, not worth worrying about if it is difficult to exclude it.

I think the sort should just be desc by ID, because that's what we're looking for.

This wouldn't be caused by this PR, but in SK using Contribution ID CONTAINS gives you the select2, when I think it should be a text field. I can do a separate issue for that if that would be better. Works correctly in API Explorer.

@seamuslee001
Copy link
Contributor

Jenkins re test this please

@colemanw colemanw force-pushed the contributionAutocomplete branch from 7186a27 to 5773bd7 Compare February 1, 2023 22:30
@colemanw
Copy link
Member Author

colemanw commented Feb 1, 2023

Thanks for the review @larssandergreen - I've updated it to include the ID, which is consistent with other entities.
Also, to be consistent with other entities I think it should still sort by contact name.
But keep in mind that these things can be configured on a per-site and even a per-field basis by overriding the default display in SearchKit.

@totten
Copy link
Member

totten commented Feb 2, 2023

Test failures unrelated.

@totten totten merged commit a5b5143 into civicrm:5.58 Feb 2, 2023
@totten totten deleted the contributionAutocomplete branch February 2, 2023 00:32
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.

4 participants