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

ensure checkbox imports work on contacts #24902

Closed

Conversation

jmcclelland
Copy link
Contributor

Overview

Ensure checkboxes with string values are imported properly.

See https://lab.civicrm.org/dev/core/-/issues/3850 and the fix in #24848

The initial fix was tested, but I think I may have tested when importing the integer values? I'm not sure, but now when I test with string values for checkboxes it fails.

Before

When importing a check box custom field using the multiple choice values in the import, the user gets a validation error: "1" is not a valid option for field custom_1.

After

The import is properly recorded in the database.

Technical Details

I followed the lead of the early PR and removed code that seems unnecessary now.

@civibot
Copy link

civibot bot commented Nov 4, 2022

(Standard links)

@civibot civibot bot added the master label Nov 4, 2022
@eileenmcnaughton
Copy link
Contributor

Thanks @jmcclelland - we should target the 5.56 rc branch since this is a regression

@jmcclelland
Copy link
Contributor Author

@eileenmcnaughton should I edit this PR and change the target from master to 5.56 or open a new PR?

@eileenmcnaughton
Copy link
Contributor

@jmcclelland I realised I wasn't quite sure how to replicate the described error - this PR e99a2a1#diff-775f76b58122b4c51d682ada372364fefe37d6f13f4eba37fb361b88d6de40f5R863 does seem to test text labels

Based on my general feeling that almost all that function is better out that in & handled elsewhere I will merge this if you tell me you have UI-tested it & it improves the situation - but ideally we would pin down the issue & add a test & fix in the rc. It depends where you are at with it.

@jmcclelland
Copy link
Contributor Author

I have this code running in production on our 5.51 sites. But, I still don't have a solid grasp on why this caused breakage and why my fix actually worked, so it might be better to pause on this. I may need a week or two before I can circle back and try to get a test in place.

@eileenmcnaughton
Copy link
Contributor

@jmcclelland ok sure - I'll close the gitlab for now as we don't have a known bug at the moment

I'm also Ok to merge this to master on the basis of it being 'code that should go' - if you have it running with this patch on a bunch of prod sites. In general I think that function is mostly code-to-be-removed.

@civicrm-builder
Copy link

Can one of the admins verify this patch?

@stesi561
Copy link
Contributor

@jmcclelland did you get further with this or should it be closed?

@eileenmcnaughton
Copy link
Contributor

ohh - thanks for highlighting this one @stesi561 - we have a report of this bug again & I have managed to replicate but hadn't started trying to fix yet...

@eileenmcnaughton
Copy link
Contributor

Closing in favour of #25639 which is against the rc

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