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

4.3 upgrade must assign financial type to price sets and price set field value rows

    Details

    • Type: Task
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.0
    • Component/s: Accounting Integration
    • Labels:
      None

      Description

      Contribution type was required in 4.2 at the price set level when a price set is 'used for' (extends) Membership. Contribution type was not set for other price sets. In 4.3, all price sets will carry a 'default' financial type. A financial type value needs to be populated and propagated to the price set's price_field_value rows during the 4.3 upgrade.

      We can use price_set.extends ('Used for') to determine the type(s) of transactions the price set is intended for. However, if a site has modified the 'default' contribution types we don't know which contribution type (now financial type) is the best default choice for each type of transaction. In this case, we will re-enable or re-insert the default type(s) and use those for the price set defaults. If we've done this - we will alert the user at the end of the upgrade that they should review all price set financial type assignments.

      1. Check for these 'default' contribution types prior to financial type migration: 'Donation', 'Event Fee', 'Member Dues'). If any are disabled (is_active = 0), re-enable them. If missing, insert them.

      2. After financial type migration, select all price set rows where financial_type_id is NULL. Set a financial_type_id for these rows based on the value in price_set.extends column.

      Extends Financial Type
      ---------- --------------------
      1 OR 12 Event Fee
      2 Donation
      3 Member Dues

      NOTE: in table above, price sets with Extends = 12 are used for Events AND Contributions. We will set financial type to Event Fee for this condition as shown.

      3. Now set values for price_field_value.financial_type_id
      IF
      price_field_value.membership_type_id is NOT NULL, retrieve financial_type_id via membership_type.financial_type_id

      ELSE
      retrieve financial_type_id from the containing price_set.financial_type_id

      4. Test the upgrade with both default and non-default combinations of contribution types, and with at least on non quick-config Membership Price Set and Event Price Set.

        Attachments

          Activity

            People

            • Assignee:
              pradeep.nayak Pradeep Nayak
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: