Append order item overrides the exist one if the last order item is "canceled"
------------------------------------------------------------------------------ Key: OFBIZ-4470 URL: https://issues.apache.org/jira/browse/OFBIZ-4470 Project: OFBiz Issue Type: Bug Components: order Affects Versions: SVN trunk Reporter: Leon Priority: Minor Fix For: SVN trunk An order was created and its last order item (with max itemSeqId) was canceled. If appened a new order item to this order, the new one will override the last one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
[ https://issues.apache.org/jira/browse/OFBIZ-4470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leon updated OFBIZ-4470: ------------------------ Attachment: OFBIZ-4470.patch set the correct nextItemSeq of shopping cart. It the "next" item sequence id, not the miximal item sequence id. > Append order item overrides the exist one if the last order item is "canceled" > ------------------------------------------------------------------------------ > > Key: OFBIZ-4470 > URL: https://issues.apache.org/jira/browse/OFBIZ-4470 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Reporter: Leon > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4470.patch > > > An order was created and its last order item (with max itemSeqId) was canceled. If appened a new order item to this order, the new one will override the last one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leon updated OFBIZ-4470: ------------------------ Attachment: (was: OFBIZ-4470.patch) > Append order item overrides the exist one if the last order item is "canceled" > ------------------------------------------------------------------------------ > > Key: OFBIZ-4470 > URL: https://issues.apache.org/jira/browse/OFBIZ-4470 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Reporter: Leon > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4470.patch > > > An order was created and its last order item (with max itemSeqId) was canceled. If appened a new order item to this order, the new one will override the last one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leon updated OFBIZ-4470: ------------------------ Attachment: OFBIZ-4470.patch works as desire this time. > Append order item overrides the exist one if the last order item is "canceled" > ------------------------------------------------------------------------------ > > Key: OFBIZ-4470 > URL: https://issues.apache.org/jira/browse/OFBIZ-4470 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Reporter: Leon > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4470.patch > > > An order was created and its last order item (with max itemSeqId) was canceled. If appened a new order item to this order, the new one will override the last one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128149#comment-13128149 ] Jacques Le Roux commented on OFBIZ-4470: ---------------------------------------- Hi Leon, I have tried but did not reproduce the problem (see WSCO10000 currently in trunk: the 2d item is cancelled. The order will be deleted in about 20 hours). Could you give me the exact steps you used? > Append order item overrides the exist one if the last order item is "canceled" > ------------------------------------------------------------------------------ > > Key: OFBIZ-4470 > URL: https://issues.apache.org/jira/browse/OFBIZ-4470 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Reporter: Leon > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4470.patch > > > An order was created and its last order item (with max itemSeqId) was canceled. If appened a new order item to this order, the new one will override the last one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133243#comment-13133243 ] Leon commented on OFBIZ-4470: ----------------------------- Hi Jacques, sorry for late response. The problem is occured after I applied our internal patch as OFBIZ-4485 described (see the third change: make order item sequence id more compact and truely "sequential"). sorry again for not mention this earlier. And if we allowe the empty order (the order without any valid item or all order items are cancelled), then this problem will also occur if all the order items have been cancelled and the new order item is appeneded after that. In the code level, if the nextItemSeq is set to the sequence id of last order item but not the true "next" one, then in ShoppingCart.makeOrderItems method, the problem will occur if the cart does not contain any exist order items (all cart items's orderItemSeqId are null): {code:java} for (ShoppingCartItem item : cartLines) { if (UtilValidate.isEmpty(item.getOrderItemSeqId())) { String orderItemSeqId = UtilFormatOut.formatPaddedNumber(nextItemSeq, 5); item.setOrderItemSeqId(orderItemSeqId); } else { try { int thisSeqId = Integer.parseInt(item.getOrderItemSeqId()); if (thisSeqId > nextItemSeq) { nextItemSeq = thisSeqId; } } catch (NumberFormatException e) { Debug.logError(e, module); } } nextItemSeq++; {code} > Append order item overrides the exist one if the last order item is "canceled" > ------------------------------------------------------------------------------ > > Key: OFBIZ-4470 > URL: https://issues.apache.org/jira/browse/OFBIZ-4470 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Reporter: Leon > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4470.patch > > > An order was created and its last order item (with max itemSeqId) was canceled. If appened a new order item to this order, the new one will override the last one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133735#comment-13133735 ] Jacques Le Roux commented on OFBIZ-4470: ---------------------------------------- Leon, Could you give me a good sequence of added and removed products to now (OFBIZ-4485 being close) reproduce the pb (it's uneasy with the promotions...) > Append order item overrides the exist one if the last order item is "canceled" > ------------------------------------------------------------------------------ > > Key: OFBIZ-4470 > URL: https://issues.apache.org/jira/browse/OFBIZ-4470 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Reporter: Leon > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4470.patch > > > An order was created and its last order item (with max itemSeqId) was canceled. If appened a new order item to this order, the new one will override the last one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133875#comment-13133875 ] Leon commented on OFBIZ-4470: ----------------------------- hi, Jacques, to avoid promotions, please select following products: "SAUCE-TM"(quan:3), "SAUCE-CM"(quan:3), and quickly create the order. after that, cancel the "SAUCE-CM" and then add new product, such as "PEPPERS-G". You will notice that the cancelled "SAUCE-CM" is overridden. > Append order item overrides the exist one if the last order item is "canceled" > ------------------------------------------------------------------------------ > > Key: OFBIZ-4470 > URL: https://issues.apache.org/jira/browse/OFBIZ-4470 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Reporter: Leon > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4470.patch > > > An order was created and its last order item (with max itemSeqId) was canceled. If appened a new order item to this order, the new one will override the last one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-4470. ---------------------------------- Resolution: Fixed Fix Version/s: Release Branch 11.04 Release Branch 10.04 Assignee: Jacques Le Roux Thanks Leon! Your patch is in trunk r1188042 R11.04 r1188048 R10.04 r1188047 > Append order item overrides the exist one if the last order item is "canceled" > ------------------------------------------------------------------------------ > > Key: OFBIZ-4470 > URL: https://issues.apache.org/jira/browse/OFBIZ-4470 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Reporter: Leon > Assignee: Jacques Le Roux > Priority: Minor > Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4470.patch > > > An order was created and its last order item (with max itemSeqId) was canceled. If appened a new order item to this order, the new one will override the last one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |