Closed LeedsBreadCo-op closed 9 years ago
Could you give me a link or two to where this is happening?
On 16 April 2015 at 16:03, LeedsBreadCo-op notifications@github.com wrote:
Oddity to flag up.
On wholesale orders - Brown rolls are copying fwd as focaccia for Culinary Quest.
This copying error doesn't happen for other wholesale customers
Haven't found any other problems so far
zig
— Reply to this email directly or view it on GitHub https://github.com/nikolai-b/leeds-bread-coop/issues/56.
It was here http://leeds-bread-coop.herokuapp.com/admin/wholesale_customers/18/orders
but I edited the order so that it reflects the correct order. It copied over fine during the Sunday duplication so I think we can close this issue.
Found a similar error for another customer.
http://leeds-bread-coop.herokuapp.com/admin/wholesale_customers/7/orders
Some of the ciabatta loaves numbers have changed. Order 23/4/15 was for 20 but has changed to 19. 28/4/15 was 14 now is 13.
I checked them last week and they were right so wonder if this could have happen during the Sunday copy even though this is data that shouldn't be affected by the copy as its this week.
Any ideas?
Cheers
Zig
Thanks. The order for the 23 is http://leeds-bread-coop.herokuapp.com/admin/wholesale_customers/7/orders/1006 (so has id 1006
) and the one the week before is http://leeds-bread-coop.herokuapp.com/admin/wholesale_customers/7/orders/909 (so has id 909
).
Looking at the database (specifically the created and updated at times):
>Order.find(1006).line_items
=> [
<LineItem id: 2599, order_id: 1006, bread_type_id: 1, quantity: 6, created_at: "2015-03-28 01:00:55", updated_at: "2015-04-21 16:37:40">,
<LineItem id: 2601, order_id: 1006, bread_type_id: 11, quantity: 4, created_at: "2015-03-28 01:00:55", updated_at: "2015-03-28 01:00:55">,
<LineItem id: 2600, order_id: 1006, bread_type_id: 14, quantity: 20, created_at: "2015-03-28 01:00:55", updated_at: "2015-04-21 16:37:40">
]>
> Order.find(909).line_items
=> [
<LineItem id: 2321, order_id: 909, bread_type_id: 13, quantity: 2, created_at: "2015-03-21 01:00:34", updated_at: "2015-03-21 01:00:34">,
<LineItem id: 2320, order_id: 909, bread_type_id: 14, quantity: 19, created_at: "2015-03-21 01:00:34", updated_at: "2015-03-21 01:00:34">,
<LineItem id: 2319, order_id: 909, bread_type_id: 11, quantity: 4, created_at: "2015-03-21 01:00:34", updated_at: "2015-03-21 01:00:34">
]>
It looks like someone updated that order the day after you posted the bug, i.e. at 2015-04-21 16:37:40
. If this happens again let me know but my guess is someone edited it your end but can't tell (unless I get a db backup but that is a bit of a pain, i.e. would take me 20 mins :smile_cat: ). Maybe having a updated_by
column would be good so you can see the changes someone has made to the order but that is starting to get complicated.
Oddity to flag up.
On wholesale orders - Brown rolls are copying fwd as focaccia for Culinary Quest.
This copying error doesn't happen for other wholesale customers
Haven't found any other problems so far
zig