Autosave changed shipping rates#6374
Merged
tvdeyen merged 2 commits intosolidusio:mainfrom Nov 22, 2025
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6374 +/- ##
=======================================
Coverage 89.45% 89.45%
=======================================
Files 974 974
Lines 20322 20322
=======================================
Hits 18179 18179
Misses 2143 2143 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
kennyadsl
approved these changes
Nov 18, 2025
adammathys
approved these changes
Nov 19, 2025
168a66e to
59a592d
Compare
Contributor
Author
|
I've added a direct spec for shipments testing "marked_for_destruction", because on direct associations that is one of the few ways in which it actually changes behavior. I've also added |
Member
|
Good to merge for me! |
For in-memory promotion recalculation, it's important that shipping rates and their associated discounts are persisted when the underlying order is `save`d. This only works with the `inverse_of: shipping_rates` is set on `ShippingRate#shipment` along with the `autosave: true` on `Shipment#shipping_rates`.
Shipping Rate taxes are something we want to be able to modify in the order updater without having to update the order graph one by one.
59a592d to
12a5ebe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
For in-memory promotion recalculation, it's important that shipping rates and their associated discounts are persisted when the underlying order is
saved. This only works with theinverse_of: shipping_ratesis set onShippingRate#shipmentalong with theautosave: trueonShipment#shipping_rates.Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: