-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
dev/core#866, dev/core#1318 Fix failure to import checkboxes for activities #19111
Conversation
(Standard links)
|
@seamuslee001 this was also part of my import clean up - although it is on activity |
@jitendrapurohit (cc @petednz) I wonder if you would be able to review this - it might take a little bit of thought to do a suitable r-run |
@eileenmcnaughton Needs rebase |
ecb4935
to
da4a07a
Compare
rebased now - just need to check if it still passes |
da4a07a
to
946054f
Compare
14254bf
to
e14fab6
Compare
Passing now... |
…vities This seeks to address a long-standing issue whereby checkboxes cannot be imported onto activities if the name and value match. Since this code was written the create was switched from a BAO create to the activity api create. Simply removing the handling to prepare for the BAO create allows the api to do it correctly
e14fab6
to
65d27ad
Compare
retest this please |
@colemanw green |
Hmm - my other tests build on this so I can't submit them until this is merged |
@eileenmcnaughton I tried testing this on my local I created a custom field set for all activates and created a checkbox single field and a radio field and a text field When I imported the sheet It didn't give me errors and viewing the activity record showed the correct information as per this screenshot However on clicking edit I found that the checkbox for the Hello option wasn't being checked as per the below screenshot This is my custom field configuration |
That's odd, especially if it shows on view. When I try it the checkbox looks ok for me on edit. Is it a value/label thing like you originally had Hello and then changed it to "2"? Then it might show on view if the value is stored in custom_value_X as Hello, but it wouldn't match the checkbox value of "2". |
@seamuslee001 is that regressive? If not it will be easier for me to address it if this is merged first |
(I'm assuming the issue is the value separator not being wrapped correctly) |
I've tried a couple things and haven't seen anything unusual except some preexisting date issues. I'm not seeing what Seamus is seeing with the checkbox. |
yeh I'm not sure what happened with my import but I'm comfortable with this PR if @demeritcowboy is |
Ok. I've added some wording to the dev digest as a candidate for the next one. (Edited to remove the link so bots don't use it as food.) |
Thanks @demeritcowboy @seamuslee001 |
@seamuslee001 were you going to merge this? |
Merging as per review by @demeritcowboy |
thanks |
Overview
This seeks to address a long-standing issue whereby checkboxes cannot be imported onto
activities if the name and value match.
https://lab.civicrm.org/dev/core/-/issues/1318
https://lab.civicrm.org/dev/core/-/issues/866
https://issues.civicrm.org/jira/browse/CRM-17493
Before
After
above works and has unit test cover
Technical Details
Since this code was written the create was switched from a BAO create to the
activity api create. Simply removing the handling to prepare for the BAO create
allows the api to do it correctly
Comments
Since this is just removing code & adding a test the main review task is r-run. However, it might require a reviewer to think about testing different custom field types to be sure
My test csv looked like this