localorbit icon indicating copy to clipboard operation
localorbit copied to clipboard

Suppliers shouldn't get an 'order has been changed' email if their portion of order was unchanged

Open rbarreca opened this issue 7 years ago • 2 comments

If a buyer orders 20 lbs apples from Supplier A and 10 lbs bananas from Supplier B, then a market manager changes the ordered quantity of apples to 15 lbs, both Supplier A and Supplier B will get an email saying their order was updated. This issue is just to fix it so Supplier B will not get an email.

There is a larger issue that the email doesn’t actually show the item that was changed and from what quantity to what quantity and/or what new item was added.

[JIRA Import Details] Issue URL: https://localorbit.atlassian.net/browse/LO-1096 Reporter: Rob Barreca Status: To Do Issue Type: Bug

rbarreca avatar Jul 11 '18 04:07 rbarreca

@rbarreca I've stepped through this process but I can't find when an emaik is send after a market manager updates an order. Is there a nightly task or something that triggers update emails?

ivar avatar Sep 13 '18 00:09 ivar

@ivar I simply traced back from seller_order_updated and it appears that it is triggered by perform_add_items in OrdersController, which then calls UpdateOrderWithNewItems organizer, which then calls SendUpdateEmails interactor.

In the UI, this is done when a market manager clicks the Add Items button while viewing an order then adds some items to the order.

rbarreca avatar Sep 15 '18 09:09 rbarreca