Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.0
-
Fix Version/s: 2.1
-
Component/s: Core CiviCRM
-
Labels:None
Description
The javascript for "copy values to all rows" (copyValues function) fails with a javascript error when used on a profile containing a custom data field that has multiple checkboxes.
copyValues defined in templates/CRM/Contact/Form/Task/BatchUpdateProfile.tpl assumes the presence of a field with a name like "field[1234][custom_12]" for a contact_id 1234 and a multi-checkbox field which is custom_12. This fails with an error if the multi checkbox fields are "red", "blue", "green" then the field names will be "field[1234][custom_12][red]", etc.
One fix is to scan the first row of the table for inputs with a partial name match against "field[1234][custom_12]", then iterate through the matching inputs and copy values from there.
See also CRM-1554 (similar but relates to date fields)