Re: Order cancellation exception

2013-05-13 Thread Jonatan Soto
That looks good too and more cleaner. Thanks Scott. I will try it and provide a new patch asap containing that approach. On Mon, May 13, 2013 at 5:44 AM, Scott Gray wrote: > FYI, you can also use some of groovy's other collection methods: > // Retrieve all non-promo items that aren't cancelled

Re: Order cancellation exception

2013-05-12 Thread Scott Gray
FYI, you can also use some of groovy's other collection methods: // Retrieve all non-promo items that aren't cancelled context.orderItemListFiltered = orderReadHelper.getOrderItems().findAll { item -> (item.isPromo == null || item.isPromo == 'N') && !(item.statusId.equals('ITEM_CANCELLED')) }

Re: Order cancellation exception

2013-05-11 Thread Jacques Le Roux
I did not look into details, but yes seems the way Thanks Jacques Jonatan Soto wrote: > There isn't afaik. Do you want me to create one if that's finally the case? > > > On Sat, May 11, 2013 at 1:39 PM, Jacques Le Roux < > jacques.le.r...@les7arts.com> wrote: > >> Is there a Jira for that, sh

Re: Order cancellation exception

2013-05-11 Thread Jonatan Soto
There isn't afaik. Do you want me to create one if that's finally the case? On Sat, May 11, 2013 at 1:39 PM, Jacques Le Roux < jacques.le.r...@les7arts.com> wrote: > Is there a Jira for that, should we not commit and backport? > > Jacques > > From: "Adrian Crum" > > That is correct. > > > > -Ad

Re: Order cancellation exception

2013-05-11 Thread Jacques Le Roux
Is there a Jira for that, should we not commit and backport? Jacques From: "Adrian Crum" > That is correct. > > -Adrian > > On 5/11/2013 11:41 AM, Jonatan Soto wrote: >> Ok, I think I got it. My solution only covered first problem, but the >> second problem implies that the first problem is no

Re: Order cancellation exception

2013-05-11 Thread Adrian Crum
That is correct. -Adrian On 5/11/2013 11:41 AM, Jonatan Soto wrote: Ok, I think I got it. My solution only covered first problem, but the second problem implies that the first problem is no longer a problem because the original order item list has to remain unmodified for further usage. So this

Re: Order cancellation exception

2013-05-11 Thread Jonatan Soto
Ok, I think I got it. My solution only covered first problem, but the second problem implies that the first problem is no longer a problem because the original order item list has to remain unmodified for further usage. So this might fix problem 2: orderItemListFiltered = new LinkedList(); ord

Re: Order cancellation exception

2013-05-11 Thread Adrian Crum
There are two problems with that part of the script: 1. It modifies a List while iterating over it. 2. It modifies a List that is contained by OrderReadHelper - so any further use of OrderReadHelper will produce incorrect data. The solution is to iterate over the List contained on OrderReadHel

Re: Order cancellation exception

2013-05-11 Thread Jonatan Soto
I could fix the issue by doing the following at line 122 of that groovy file: //canceledPromoOrderItem = [:]; orderItemList = orderReadHelper.getOrderItems(); for (Iterator iter = orderItemList.iterator(); iter.hasNext();) { //orderItemList.each { orderItem -> orderItem = iter.next();

Re: Order cancellation exception

2013-05-10 Thread Adrian Crum
Actually, OrderView.groovy line 122 doesn't make any sense. That is a flaw in the groovy code, not a problem with the List implementation. -Adrian On 5/10/2013 1:09 PM, Adrian Crum wrote: It appears LinkedList was not a good replacement for FastList. I will take care of it this weekend. -Adr

Re: Order cancellation exception

2013-05-10 Thread Adrian Crum
It appears LinkedList was not a good replacement for FastList. I will take care of it this weekend. -Adrian On 5/10/2013 12:32 PM, Jonatan Soto wrote: This is a more detailed stack trace btw. Note that once this happens is not possible to edit the order anymore. 2013-05-10 12:23:43,348 (ajp-b

Re: Order cancellation exception

2013-05-10 Thread Jonatan Soto
This is a more detailed stack trace btw. Note that once this happens is not possible to edit the order anymore. 2013-05-10 12:23:43,348 (ajp-bio-0.0.0.0-8009-exec-511) [ ScreenFactory.java:130:INFO ] Got 29 screens in 0.0080s from: file:/home/ofbiz/trunk/applications/order/widget/ordermgr/OrderVie

Re: Order cancellation exception

2013-05-10 Thread Jacques Le Roux
I get the same at https://demo-trunk.ofbiz.apache.org/ordermgr/control/orderview?orderId=WSCO10001 Could be related to recent changes Jacques From: "Jonatan Soto" > Hi, > > When cancelling an order I'm getting the following exception using the demo > (trunk) : > > org.ofbiz.widget.screen.Scre