Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.4.8
-
Fix Version/s: 4.1.2
-
Component/s: Core CiviCRM
-
Labels:None
Description
Upgrade/Incremental/sql/3.4.alpha1.mysql does the following to generate the option value for the new "Add Client To Case" activity type:
SELECT @value := MAX(value) FROM civicrm_option_value WHERE option_group_id = @option_group_id_act;
SELECT @caseCompId := max(id) FROM civicrm_component where name = 'CiviCase';
INSERT INTO civicrm_option_value
(option_group_id,
label
{/localize}, value, name, weight, {localize field='description'}description{/localize}, is_active, component_id) VALUES
(@option_group_id_act,
NULL
{/localize}, 1, @caseCompId );
So it re-uses the current maximum ID. Presumably should use @value+1 .
Dave J