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

core#1688 - false positive on missing custom field check #16961

Merged
merged 1 commit into from
Apr 3, 2020

Conversation

MegaphoneJon
Copy link
Contributor

https://lab.civicrm.org/dev/core/-/issues/1688

Overview

Any custom field that can take multiple values (multi-select, checkboxes, etc) will return a false positive for missing custom fields on the API call System.check.

Before

False positives

After

No false positives

Technical Details

The current code assumes that any saved search that has a form value starting with custom_ will end with an integer (e.g. custom_18). However, multi-select fields' form values have an operator - e.g. custom_18_operator). The check grabs 18_operator and compares it to a list of existing custom field IDs, and of course comes up empty.

Comments

I confirmed that deleting this field will still correctly trigger a warning. I gave detailed replicated steps on the Gitlab ticket.

@civibot
Copy link

civibot bot commented Apr 2, 2020

(Standard links)

@MegaphoneJon
Copy link
Contributor Author

Note that this is the rc version of #16960, which already had an r-run from Kevin C.

@seamuslee001 seamuslee001 changed the base branch from master to 5.25 April 2, 2020 23:16
@civibot civibot bot added 5.25 and removed master labels Apr 2, 2020
@seamuslee001
Copy link
Contributor

Merging as per review by Kevin on the other PR

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.

2 participants