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 stock item form to allow changing backorder value #3159

Merged
merged 1 commit into from
Jun 11, 2019

Conversation

kennyadsl
Copy link
Member

@kennyadsl kennyadsl commented Apr 2, 2019

Description

This PR fixes a bug on the admin stock item forms that I discovered yesterday, probably introduced in #2862.

The form controls to submit the stock item form was not displayed if the backorder checkbox was the only attribute changed. This is wrong since we could need to change that value without also changing the count on hand value.

This PR fixes this bug by considering also the backorder value changes when we decide if showing the stock item form or not.

Before

stock-item-before

After

stock-item-after

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change (if needed)

@kennyadsl kennyadsl added type:bug Error, flaw or fault changelog:solidus_backend Changes to the solidus_backend gem labels Apr 2, 2019
@kennyadsl kennyadsl self-assigned this Apr 2, 2019
@kennyadsl kennyadsl requested a review from tvdeyen April 2, 2019 11:11
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

Thanks 👍

The form controls to submit the stock item form was not
displayed if only the backorder checkbox changed.
Copy link
Member

@spaghetticode spaghetticode left a comment

Choose a reason for hiding this comment

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

@kennyadsl thank you for this fix! 👍

Copy link
Contributor

@ericsaupe ericsaupe left a comment

Choose a reason for hiding this comment

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

Thank you! We just encountered this recently too.

@kennyadsl kennyadsl merged commit 1ae9656 into solidusio:master Jun 11, 2019
@kennyadsl kennyadsl deleted the kennyadsl/fix-stock-backordered branch June 11, 2019 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_backend Changes to the solidus_backend gem type:bug Error, flaw or fault
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants