[go: up one dir, main page]

Skip to content
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

fix(StoreCredit): Add display_number method #5741

Merged
merged 1 commit into from
May 8, 2024

Conversation

tvdeyen
Copy link
Member
@tvdeyen tvdeyen commented May 3, 2024

Summary

display_number is used by many partials and templates displaying the payment source identifier to users
or admins.

StoreCredit was missing this method, leading to errors if a store credit is used as payment source.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

display_number is used by many partials and templates
displaying the payment source identifier to users
or admins.

StoreCredit was missing this metho, leading to errors
if a store credit is used as payment source.
@tvdeyen tvdeyen requested a review from a team as a code owner May 3, 2024 06:14
@github-actions github-actions bot added the changelog:solidus_core Changes to the solidus_core gem label May 3, 2024
@tvdeyen tvdeyen added backport-v4.3 Backport this pull-request to v4.3 type:bug Error, flaw or fault changelog:solidus_core Changes to the solidus_core gem and removed changelog:solidus_core Changes to the solidus_core gem labels May 3, 2024
Copy link
codecov bot commented May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.84%. Comparing base (5b65373) to head (89aaf70).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5741   +/-   ##
=======================================
  Coverage   88.84%   88.84%           
=======================================
  Files         704      704           
  Lines       16764    16765    +1     
=======================================
+ Hits        14894    14895    +1     
  Misses       1870     1870           

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

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.

@tvdeyen Approving, but it would be great if you could specify in which scenario and which pages exactly you did see those errors, for future reference. Thanks Thomas!

@tvdeyen
Copy link
Member Author
tvdeyen commented May 3, 2024

@tvdeyen Approving, but it would be great if you could specify in which scenario and which pages exactly you did see those errors, for future reference. Thanks Thomas!

@kennyadsl We saw this in our custom invoice pdf template, where we simply loop over all payments and display each payment.source.display_number. We could have solved it with a respond_to(:display_number), but think it is more convenient to be able just call display_number on any source (hence the name, that we probably want to change to something more generic in the future).

@tvdeyen tvdeyen merged commit 88f7711 into solidusio:main May 8, 2024
19 of 21 checks passed
@tvdeyen tvdeyen deleted the store_credit-display_number branch May 8, 2024 10:37
Copy link
github-actions bot commented May 8, 2024

💚 All backports created successfully

Status Branch Result
v4.3

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v4.3 Backport this pull-request to v4.3 changelog:solidus_core Changes to the solidus_core gem type:bug Error, flaw or fault
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants