Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-9795

Upgrade/Incremental/sql/3.4.alpha1.mysql duplicates existing activity type option value for Add Client To Case

    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,

      {localize field='label'}

      label

      {/localize}, value, name, weight, {localize field='description'}description{/localize}

      , is_active, component_id) VALUES
      (@option_group_id_act,

      {localize}'Add Client To Case'{/localize}, @value, 'Add Client To Case', @weight, {localize}

      NULL

      {/localize}

      , 1, @caseCompId );

      So it re-uses the current maximum ID. Presumably should use @value+1 .

      Dave J

        Attachments

          Activity

            People

            • Assignee:
              rohan Rohan S. Chavan
              Reporter:
              davej Dave Jenkins
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: