Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-11168

Issue in creating promotion action

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Release Branch 18.12, Trunk
    • 17.12.05, 18.12.01
    • product
    • None

    Description

      Steps to replicate:
      1. Navigate to create promotion screen and create a promotion.
      2. Add a promotion rule.
      3. Add condition of cart sub-total greater than zero. Create condition.
      4. In action select X product at Y price and also add the amount.
      5. Click on create action button.
      6. System is throwing error as below:

      The Following Errors Occurred:

      Error doing entity-auto operation for entity ProductPromoAction in service createProductPromoAction: org.apache.ofbiz.entity.GenericEntityException: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:ProductPromoAction][amount,null()][createdStamp,2019-08-24 09:25:00.139(java.sql.Timestamp)][createdTxStamp,2019-08-24 09:25:00.086(java.sql.Timestamp)][customMethodId,[, PPA_PROD_AMDISC](java.lang.String)][lastUpdatedStamp,2019-08-24 09:25:00.139(java.sql.Timestamp)][lastUpdatedTxStamp,2019-08-24 09:25:00.086(java.sql.Timestamp)][orderAdjustmentTypeId,PROMOTION_ADJUSTMENT(java.lang.String)][partyId,null()][productId,null()][productPromoActionSeqId,10003(java.lang.String)][productPromoId,10000(java.lang.String)][productPromoRuleId,00001(java.lang.String)][quantity,500(java.math.BigDecimal)][serviceName,null()][useCartQuantity,N(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.PRODUCT_PROMO_ACTION (PRODUCT_PROMO_ID, PRODUCT_PROMO_RULE_ID, PRODUCT_PROMO_ACTION_SEQ_ID, PRODUCT_PROMO_ACTION_ENUM_ID, CUSTOM_METHOD_ID, ORDER_ADJUSTMENT_TYPE_ID, SERVICE_NAME, QUANTITY, AMOUNT, PRODUCT_ID, PARTY_ID, USE_CART_QUANTITY, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_PROMO_ACTION' caused a violation of foreign key constraint 'PROD_PRACT_CMET' for key ([, PPA_PROD_AMDISC]). The statement has been rolled back.)) (Error while inserting: [GenericEntity:ProductPromoAction][amount,null()][createdStamp,2019-08-24 09:25:00.139(java.sql.Timestamp)][createdTxStamp,2019-08-24 09:25:00.086(java.sql.Timestamp)][customMethodId,[, PPA_PROD_AMDISC](java.lang.String)][lastUpdatedStamp,2019-08-24 09:25:00.139(java.sql.Timestamp)][lastUpdatedTxStamp,2019-08-24 09:25:00.086(java.sql.Timestamp)][orderAdjustmentTypeId,PROMOTION_ADJUSTMENT(java.lang.String)][partyId,null()][productId,null()][productPromoActionSeqId,10003(java.lang.String)][productPromoId,10000(java.lang.String)][productPromoRuleId,00001(java.lang.String)][quantity,500(java.math.BigDecimal)][serviceName,null()][useCartQuantity,N(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.PRODUCT_PROMO_ACTION (PRODUCT_PROMO_ID, PRODUCT_PROMO_RULE_ID, PRODUCT_PROMO_ACTION_SEQ_ID, PRODUCT_PROMO_ACTION_ENUM_ID, CUSTOM_METHOD_ID, ORDER_ADJUSTMENT_TYPE_ID, SERVICE_NAME, QUANTITY, AMOUNT, PRODUCT_ID, PARTY_ID, USE_CART_QUANTITY, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_PROMO_ACTION' caused a violation of foreign key constraint 'PROD_PRACT_CMET' for key ([, PPA_PROD_AMDISC]). The statement has been rolled back.)))

      Attachments

        1. customMethodID.png
          37 kB
          Jacques Le Roux

        Activity

          People

            jleroux Jacques Le Roux
            lalit.dashora Lalit Dashora
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: