Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aldeed
Copy link
Contributor

@aldeed aldeed commented Mar 7, 2019

Part of #4999
Impact: minor
Type: feature

Changes

A new splitOrderItem mutation allows you to split one order item into two items, such that the two items are identical other than their quantity and subtotal, and their quantities add up to the original item's quantity.

The operator UI does not yet implement this.

  • splitOrderItem can be called internally to synchronize from an external system by setting context.isInternalCall to true
  • splitOrderItem can be called through GraphQL by any user with "orders" permission for the shop that owns the order

Breaking changes

None

Testing

  1. Place an order.
  2. Verify that the mutation works as described.
  3. Verify that you can split an order item when authenticated as a user with "orders" role, but not when authenticated as someone else or when not authenticated.

@aldeed aldeed self-assigned this Mar 7, 2019
@aldeed aldeed added this to the 🏔 Uncompahgre milestone Mar 7, 2019
@aldeed aldeed requested a review from kieckhafer March 7, 2019 19:54
Copy link
Member

@kieckhafer kieckhafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When splitting a taxable item, taxes do not split between the items, they are just duplicated across both items.

robo_3t_-_1_1

Copy link
Member

@kieckhafer kieckhafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, one issue I came across where Taxes are not split between items, but aside from that:

  • subtotal updates as it should
  • the items move as they should
  • the restrictions on quantity work, you can only move x-1 items, always leaving at least one in the original item
  • Account restrictions work

Should be good to go once taxes are fixed.

@aldeed aldeed requested a review from kieckhafer March 15, 2019 13:40
@aldeed
Copy link
Contributor Author

aldeed commented Mar 15, 2019

@kieckhafer The tax and other total recalculation issues should be fixed now

Copy link
Member

@kieckhafer kieckhafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Changes look good, Taxes and subtotals now move with the item

@kieckhafer kieckhafer merged commit 85ab73c into develop Mar 15, 2019
@aldeed aldeed deleted the feat-aldeed-split-order-item-mutation branch March 16, 2019 01:53
@jeffcorpuz jeffcorpuz mentioned this pull request Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants