-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Promotions: Fix default calculator fields partial bug and make PercentWithCap calculator available in the UI #6381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6381 +/- ##
=======================================
Coverage 89.46% 89.46%
=======================================
Files 975 975
Lines 20335 20335
=======================================
Hits 18192 18192
Misses 2143 2143 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we extract the fix from the added calculator? The partial fix can be back ported to 4.6, but the calculator is only present in main (4.7.0.dev) and cannot be ported.
The calculator is present in 4.6, and it's the only calculator that we ship that needs the fallback partial - that's why both commits are together, I can't really test the problem without the calculator. Cf 09c3ec5 |
Ah, I was was misreading 6b2f3df (which is only present in |
|
The PR title is doing a good job in confusing as well
@mamhoff Can you rephrase this please? |
Done |
We've added a promotion calculator, but we have not made it available to users.
For all calculators except the `PercentWithCap` one we have a custom `calculator_fields` partial. PercentWithCap does not need that - it can fall back to the default calculator fields partial. However, that partial does not render currently, because `name` is a symbol that does not respond to `humanize`. Adds a system spec as well.
45c4e2a to
7e1de2d
Compare
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
Summary
This adds the
PercentWithCapcalculator to the list of available line item promotion calculators, and also fixes the default calculator fields partial to not try to send:humanizeto aSymbol.Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: