From notifications-return-28686-archive-asf-public=cust-asf.ponee.io@ofbiz.apache.org Sat Sep 28 10:31:03 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id AE301180645 for ; Sat, 28 Sep 2019 12:31:02 +0200 (CEST) Received: (qmail 65687 invoked by uid 500); 28 Sep 2019 10:31:02 -0000 Mailing-List: contact notifications-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list notifications@ofbiz.apache.org Received: (qmail 65678 invoked by uid 99); 28 Sep 2019 10:31:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Sep 2019 10:31:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id F2498E30FE for ; Sat, 28 Sep 2019 10:31:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 306D37807CE for ; Sat, 28 Sep 2019 10:31:00 +0000 (UTC) Date: Sat, 28 Sep 2019 10:31:00 +0000 (UTC) From: "Jacques Le Roux (Jira)" To: notifications@ofbiz.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OFBIZ-11168) Issue in creating promotion action MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OFBIZ-11168?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D169= 39934#comment-16939934 ]=20 Jacques Le Roux commented on OFBIZ-11168: ----------------------------------------- Thanks Rohit, Pawan The condition and action are indeed created but I see 2 issues (maybe relat= ed): In log: {noformat} 2019-09-28 12:06:19,637 |sse-nio-8443-exec-10 |FreeMarkerWorker = |E| null freemarker.core.InvalidReferenceException: The following has evaluated to n= ull or missing: =3D=3D> productPromoAction.getRelatedOne("ActionEnumeration", true) [in te= mplate "component://product/template/promo/EditProductPromoRules.ftl" at li= ne 294, column 46] [...] {noformat} In UI it shows PPA_PROD_PRICE instead of "X Product for Y Price" (which sho= ws below in the list). I guess it's related to how the ProductPromoAction is stored:=20 !customMethodID.png! > Issue in creating promotion action > ---------------------------------- > > Key: OFBIZ-11168 > URL: https://issues.apache.org/jira/browse/OFBIZ-11168 > Project: OFBiz > Issue Type: Bug > Components: product > Affects Versions: Trunk, Release Branch 18.12 > Reporter: Lalit Dashora > Assignee: Jacques Le Roux > Priority: Major > Attachments: customMethodID.png > > > 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 servic= e createProductPromoAction: org.apache.ofbiz.entity.GenericEntityException:= org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [Ge= nericEntity:ProductPromoAction][amount,null()][createdStamp,2019-08-24 09:2= 5:00.139(java.sql.Timestamp)][createdTxStamp,2019-08-24 09:25:00.086(java.s= ql.Timestamp)][customMethodId,[, PPA_PROD_AMDISC](java.lang.String)][lastUp= datedStamp,2019-08-24 09:25:00.139(java.sql.Timestamp)][lastUpdatedTxStamp,= 2019-08-24 09:25:00.086(java.sql.Timestamp)][orderAdjustmentTypeId,PROMOTIO= N_ADJUSTMENT(java.lang.String)][partyId,null()][productId,null()][productPr= omoActionSeqId,10003(java.lang.String)][productPromoId,10000(java.lang.Stri= ng)][productPromoRuleId,00001(java.lang.String)][quantity,500(java.math.Big= Decimal)][serviceName,null()][useCartQuantity,N(java.lang.String)] (SQL Exc= eption while executing the following:INSERT INTO OFBIZ.PRODUCT_PROMO_ACTION= (PRODUCT_PROMO_ID, PRODUCT_PROMO_RULE_ID, PRODUCT_PROMO_ACTION_SEQ_ID, PRO= DUCT_PROMO_ACTION_ENUM_ID, CUSTOM_METHOD_ID, ORDER_ADJUSTMENT_TYPE_ID, SERV= ICE_NAME, QUANTITY, AMOUNT, PRODUCT_ID, PARTY_ID, USE_CART_QUANTITY, LAST_U= PDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUE= S (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUC= T_PROMO_ACTION' caused a violation of foreign key constraint 'PROD_PRACT_CM= ET' for key ([, PPA_PROD_AMDISC]). The statement has been rolled back.)) (E= rror while inserting: [GenericEntity:ProductPromoAction][amount,null()][cre= atedStamp,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.Timest= amp)][lastUpdatedTxStamp,2019-08-24 09:25:00.086(java.sql.Timestamp)][order= AdjustmentTypeId,PROMOTION_ADJUSTMENT(java.lang.String)][partyId,null()][pr= oductId,null()][productPromoActionSeqId,10003(java.lang.String)][productPro= moId,10000(java.lang.String)][productPromoRuleId,00001(java.lang.String)][q= uantity,500(java.math.BigDecimal)][serviceName,null()][useCartQuantity,N(ja= va.lang.String)] (SQL Exception while executing the following:INSERT INTO O= FBIZ.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 h= as been rolled back.))) -- This message was sent by Atlassian Jira (v8.3.4#803005)