Broadleaf Microservices
  • v1.0.0-latest-prod

Offer Release Notes for 3.0.6

Important Updates

Spring Boot Upgrade

  • As of Broadleaf Release Train 2.0.4-GA, all microservices have been upgraded to Spring Boot 3.3.

Bug Fixes

  • Fixed an issue where the Free Gift offer applied correctly but displayed an incorrect error message

New Features & Notable Changes

Updates to the Audit tab of Campaigns

  • The issue has been fixed where audit entries are missing from the list grid. The method for retrieving this data has been updated.

    • AlternateLifecycleSharedCodeAuditSummaryRepository#createOrUpdateAndIncrement(String, String, MonetaryAmount, ContextInfo) is deprecated

    • New column campaignId is added to BLC_SHARED_CODE_AUDIT_SUMMARY table

  • Add new otherMessagesMap and otherItemMessagesMap map fields to the MarketingMessageResponse.

  • Introduced logic in the DefaultMarketingMessageResolver populate the new map fields with any marketing messages that do not match the of the out-of-box LocationTypes.

  • Code generation now ensures uniqueness across all generators within a campaign, not just within individual batches/generators.

Miscellaneous

  • Signature change in DefaultItemOfferProcessor#buildReducedFeeGiftDetail: the 3rd parameter Adjustment has been added. This is an itemAdjustment of the FreeGiftItem, used to determine appropriate currency.

Data Migration

A new column - campaign_id was added to the blc_shared_code_audit_summary table, and it is now used to query data for the audit tab of the campaign. In order for the audit tab to work with historical data, you will need to populate it with data via a migration. You can use the following example script for postgres to populate the campaign_id column. Adapt the script for your DB. Depending on the amount of the data in the blc_shared_code_audit_summary it might be worth disabling index and enabling it after migration.

blc_shared_code_audit_summary

DO
$$
    DECLARE
        batch_size   INT  := 10000;
        last_id      TEXT := '';
        rows_updated INT;
    BEGIN
        LOOP
            WITH cte AS (
                SELECT s.id
                FROM offer.blc_shared_code_audit_summary s
                WHERE s.id > last_id
                ORDER BY s.id
                LIMIT batch_size
            )
            UPDATE offer.blc_shared_code_audit_summary s
            SET campaign_id = oc.campaign_id
            from offer.blc_offer_code oc, cte
            where oc.id = s.offer_code_id and s.id = cte.id;

            GET DIAGNOSTICS rows_updated = ROW_COUNT;
            EXIT WHEN rows_updated = 0;

            -- Advance last_id for next loop
            SELECT MAX(id)
            INTO last_id
            FROM (SELECT s.id
                  FROM offer.blc_shared_code_audit_summary s
                  WHERE s.id > last_id
                  ORDER BY s.id
                  LIMIT batch_size) as si;

            PERFORM pg_sleep(0.2); -- pause to reduce load
        END LOOP;
    END
$$;