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: Batch update participants with checkboxes fails #12051

Merged
merged 1 commit into from
Apr 29, 2018

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

https://lab.civicrm.org/dev/core/issues/89
Fix error when trying to use batch update with custom checkboxes

Before

Does not submit

After

Does submit, unit tested

Technical Details

For readability I will rebase once #12048 is merged - the actual changes for this are quite minor

Comments

I suspect other batch updates may have a similar bug :-(

@eileenmcnaughton
Copy link
Contributor Author

style warning will be ok when rebase is done

@mattwire
Copy link
Contributor

@eileenmcnaughton It's a bit hard to see what code was changed because of the move to a separate function? Can you give us a clue. Also note that you may want to take a look at CRM_Core_Task_Batch which currently is only used for cases but should be easy to extend to other batch tasks when time is available.

@eileenmcnaughton
Copy link
Contributor Author

@mattwire - this is the 'first' PR - #12048 per above - sorry if it wasn't clear

@monishdeb
Copy link
Member

Tested the patch here's the before/after

BEFORE

test-multiple-before

AFTER

test-multiple-after

@eileenmcnaughton
Copy link
Contributor Author

@mattwire also, noted on the idea of extending - in this case the slowest parts were replication & writing the unit test so I backed off doing other entities for now - but we could maybe use a data provider for the test which would resolve that

@mattwire
Copy link
Contributor

@eileenmcnaughton Maybe add a comment that test etc could be extended in future to support multiple entities / core_task (so future people working on it are aware of the attempts to share code).

@eileenmcnaughton
Copy link
Contributor Author

@mattwire ok - good point - will tweak that when I rebase over the merged patch

@eileenmcnaughton
Copy link
Contributor Author

Ouch - I accidentally pushed the commit that was for this one into #12048 before merging! So I merged by accident. I'm going to merge this too as it is just comments but @monishdeb any chance you can double check you are happy with the merged code now

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