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

upgrade error on older sites on priceset conversion

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.9
    • Fix Version/s: 4.3.2
    • Component/s: None
    • Labels:
      None

      Description

      Price sets not converting where labels don't exist for existing option values

      Hi Joe,

      I got to the bottom of the circumstance where price sets were not being created correctly on upgrade. I had a contribution page with an option group of amounts to contribute, a disabled membership price set and other amount enabled.

      The problem was the option group of amounts to contribute was not having any price field values created as it was failing to pass this if clause in CRM_Price_BAO_Field::create()

      if (array_key_exists('option_amount', $params) &&
      array_key_exists($index, $params['option_amount']) &&
      (CRM_Utils_Array::value($index, CRM_Utils_Array::value('option_label', $params)) ||
      CRM_Utils_Array::value('is_quick_config', $params)) &&
      !CRM_Utils_System::isNull($params['option_amount'][$index])
      ) {

      I have a simple commit that seems to work on 4.2.9 & I believe it is still relevant to 4.3 - I'll paste the link to it in a comment as I need this issue number to do that commit

      Can you review & see if this makes sense for 4.3 since I guess 4.2 is not going to have another release

        Attachments

          Activity

            People

            • Assignee:
              ravish.nair Ravish Nair
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: