-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Allow items to be shipped with a qty > 0 and < 1 #35972 #36232
Allow items to be shipped with a qty > 0 and < 1 #35972 #36232
Conversation
Hi @engcom-Delta. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review. For more details, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
same #35972 |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Integration Test |
Failed to run the builds. Please try to re-run them later. |
1 similar comment
Failed to run the builds. Please try to re-run them later. |
@magento run Functional Tests CE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Integration Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
5 similar comments
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Since this is a new PR for PR, In this PR static test failure was fixed and all the checks are passed. Hence moving this PR to Merge in Progress. Thanks. |
@engcom-Delta don't you think it should be covered with some automated test? |
Hi @ihor-sviziev @ishakhsuvarov we have covered and updated the unit testcase in this PR as per the reviewed changes in PR. Thanks |
@magento run all tests |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@engcom-Delta That's great that you are added unit tests. But I have a question. ObjectManager is deprecated to use in unit tests and in fact new unit test still use this functional. I see that it's easy to use deprecated functional in same way of other tests, but in fact it's increase amount of legacy code. |
Description (*)
Cast the qty to a float, rather than an int. The casted value is checked for <= 0, so anything > 0 and < 1 would be (incorrectly) cast to a 0. If this check fails, the item is not added to the shipment. By casting to a float, the validation is passed correctly and you can now ship items with a qty between 0 and 1.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)