Skip to content

Set required line item attributes earlier#6313

Merged
kennyadsl merged 2 commits intosolidusio:mainfrom
SuperGoodSoft:set-required-line-item-attributes-earlier
Aug 5, 2025
Merged

Set required line item attributes earlier#6313
kennyadsl merged 2 commits intosolidusio:mainfrom
SuperGoodSoft:set-required-line-item-attributes-earlier

Conversation

@benjaminwil
Copy link
Contributor

Summary

This change makes working with unpersisted line items easier because required attributes are set immediately. This change is in service of creating an in-memory order updater (#5872) but is not dependent on that work and can be merged as a separate small pull request.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

@benjaminwil benjaminwil requested a review from a team as a code owner July 29, 2025 17:13
@github-actions github-actions bot added changelog:solidus_core Changes to the solidus_core gem changelog:solidus_legacy_promotions Changes to the solidus_legacy_promotions gem labels Jul 29, 2025
@codecov
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@424f284). Learn more about missing BASE report.
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6313   +/-   ##
=======================================
  Coverage        ?   89.31%           
=======================================
  Files           ?      959           
  Lines           ?    20117           
  Branches        ?        0           
=======================================
  Hits            ?    17968           
  Misses          ?     2149           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Kendra Riga and others added 2 commits July 29, 2025 10:46
Instead of instantiating new records directly or using `mock_model`, we
can use factories, which are more realistically set up objects.

Co-Authored-By: benjamin wil <benjamin@super.gd>
Co-Authored-By: Senem Soy <senem@super.gd>
Co-Authored-By: Alistair Norman <alistair@super.gd>
This makes working with unpersisted line items easier because required
attributes are set immediately. This change is in service of creating an
in-memory order updater.

Co-authored-by: Kendra Riga <kendra@super.gd>
Co-authored-by: benjamin wil <benjamin@super.gd>
@benjaminwil benjaminwil force-pushed the set-required-line-item-attributes-earlier branch from d77da61 to dbc590f Compare July 29, 2025 18:00
@github-actions github-actions bot added the changelog:solidus_promotions Changes to the solidus_promotions gem label Jul 29, 2025
Copy link
Contributor

@mamhoff mamhoff left a comment

Choose a reason for hiding this comment

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

Love this change.

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

👌

@kennyadsl kennyadsl merged commit debcb95 into solidusio:main Aug 5, 2025
39 checks passed
@tvdeyen tvdeyen added this to the 4.6 milestone Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_core Changes to the solidus_core gem changelog:solidus_legacy_promotions Changes to the solidus_legacy_promotions gem changelog:solidus_promotions Changes to the solidus_promotions gem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants