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] core#1688 - false positive on missing custom field check #16960

Closed
wants to merge 1 commit into from

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)

@civibot civibot bot added the master label Apr 2, 2020
@kcristiano
Copy link
Member

I've done a quick r-run. I can confirm that the false positives appear on a clean 5.24.0 install. Once the PR is applied no more false positives.

@seamuslee001
Copy link
Contributor

@MegaphoneJon can you put this against the 5.25 branch please and then we can look to incorporate into 5.24 branch separately

@MegaphoneJon
Copy link
Contributor Author

@seamuslee001 #16961

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