Actually using 6.x-3.2+0-dev.

I initially opened this as an Ubercart core issue #1540392: Order automatically moved to completed, skipping payment received but as I gather more info from the store admins, it seems this is probably a UC Views or a VBO issue.

Creating a new issue here rather than moving that one because there's a lot of unnecessary cruft in that one.

Basically, orders come in and they are marked as Payment Received. When the guys start processing orders, they print out packing lists using a bulk op, and then move the orders to Processing using a bulk op. In a small number of cases, the orders then get moved two seconds later to Completed.

We started noticing this around mid-March.

1. When they move an order to Processing, it's usually (almost always) done bulk using Views Bulk Operations Ubercart Views.

2. When they move an order to Completed, it is always done from the individual order screen on an order by order basis.

When I looked at the raw log entries in the database to get a little more granularity on the timestamp, I found two orders that had this happen. They both were moved from Payment Received to Processing and I think everyone agrees this was an intentional operation by the admin.

But then two seconds later, they both got moved to Completed.

Here are the log entries. Two comments
- these are all the status changes for these two orders with the important ones bolded
- these are all the status changes for all orders during that period for the store

1334774285, 3101, 0, Order status changed from In checkout to Pending
1334774292, 3101, 0, Order status changed from Pending to Payment received
1334775226, 3102, 0, Order status changed from In checkout to Pending
1334775229, 3102, 0, Order status changed from Pending to Payment received
1334776830, 3101, 25, Order status changed from Payment received to Processing
1334776830, 3102, 25, Order status changed from Payment received to Processing
1334776832, 3101, 25, Order status changed from Processing to Completed
1334776832, 3102, 25, Order status changed from Processing to Completed

Any ideas?

Comments

longwave’s picture

Are you sure you don't have any conditional actions in place that may cause an order to automatically move from Processing to Completed?

ergophobe’s picture

I do have two CAs that effect order status, one of which is disabled.

1."Update order status on full payment" - this works as expected and is standard Ubercart, meaning it checks for an order status of "in checkout" so it should never advance something from Payment Received to Completed.

2. "Complete non-shippable order after payment received" but that is a) disabled and b) the products where this has happened are all marked as shippable.

3. The only other CA that interacts with order status at all is "E-mail requested for order status update", but that is not relevant here and it fires upon order status update, rather than causing an order status update.

Other than that, there are no CAs that hook into the order status at all.We do have stock decrementing and things like that, but those are set to use the UC defaults.

longwave’s picture

As this only happens in a small number of cases, is it possible your admins occasionally double click the button by mistake, which might cause the move to trigger twice?

I guess the real fix might be to augment "move to next state" with an explicit "set order status" action.

ergophobe’s picture

Hmmm.... I guess that would mean switching the UI to a two-step process like Node Convert and presenting the user with all available states. That adds some complexity to the code and the UI. Not a lot, but right now they bulk actions for this are very simple, both from a code and UI standpoint.

I guess for my part, I would sit on this for a bit and see if anyone else reports this to get an idea how extensive the issue is. If nobody else is having the issue, then it strikes me that the cure might be worse than the disease - introducing steps, fail points, UI complexity for a problem that is as yet unexplained.

longwave’s picture

Category: bug » support

Still unable to reproduce this, but will leave open as unexplained.

#1701918: New feature: Arbitrarily change order status with bulk operations might be of interest, but as you say it is more complicated for your users.

ergophobe’s picture

Thanks. For now I've handled it this way: #1602160: Add bulk action to custom module, hooking into uc_views - Longwave - you may recall my foolish typo which you, much to my pleasure and embarrassment, caught for me