Skip to content

Fixed creating shipping labels in part-shipment #27672

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

Merged
merged 7 commits into from
Oct 21, 2020

Conversation

NikolasSumrak
Copy link
Contributor

@NikolasSumrak NikolasSumrak commented Apr 9, 2020

Fixed creating package when we ship not all items

Description (*)

When we use sources, we can create shipment for only one item from order. In this case when we try to create shipping label with shipment ("Create Shipping Label" Checkbox), the system requires to add all products to package (including products, which wasn't added to shipment) and validation fails.

Related Pull Requests

Fixed Issues (if relevant)

  1. magento/magento2#<issue_number>: Issue title

Manual testing scenarios (*)

  1. Have configured shipping method with ability to create Shipping Labels
  2. Have 2 products with available in 2 or more sources
  3. Add to cart and order both products with shipping method from point 0.
  4. Create shipment from admin panel: select source and enter qty only for one product (qty for second product should be 0)
  5. Click Proceed to Shipment.
  6. Check that only one product in Items to Ship
  7. Check checkbox "Create Shipping Label" and press "Submit Shipment..."
  8. Click "Add Products to Package". In the list there are both products.
  9. When we add to package only one product - the next button is disabled.

Expected result:
7. In the list there is only one product
8. The "Next" button is enabled

Questions or comments

Contribution checklist (*)

  • [*] Pull request has a meaningful description of its purpose
  • [*] All commits are accompanied by meaningful commit messages
  • [*] All new or changed code is covered with unit/integration tests (if applicable)
  • [*] All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] Fixed creating shipping labels in part-shipment #29552: Fixed creating shipping labels in part-shipment

@m2-assistant
Copy link

m2-assistant bot commented Apr 9, 2020

Hi @NikolasSumrak. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@sidolov
Copy link
Contributor

sidolov commented Aug 14, 2020

@magento create issue

@sidolov sidolov added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Aug 14, 2020
Copy link
Contributor

@sidolov sidolov left a comment

Choose a reason for hiding this comment

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

@NikolasSumrak could you please cover changes with automated test?

@engcom-Hotel
Copy link
Contributor

@magento run all tests

@engcom-Hotel
Copy link
Contributor

It is complicated to create MFTF for this change, because of the security issue with storing shipment account credentials. Integration test checks that JS code rendered.

Copy link
Contributor

@gabrieldagama gabrieldagama left a comment

Choose a reason for hiding this comment

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

Hi @engcom-Hotel, thanks for adding test coverage, please have a look at my comments below.

@engcom-Hotel
Copy link
Contributor

@magento run all tests

@magento-engcom-team
Copy link
Contributor

Hi @gabrieldagama, thank you for the review.
ENGCOM-8253 has been created to process this Pull Request
✳️ @gabrieldagama, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@engcom-Bravo engcom-Bravo self-assigned this Sep 24, 2020
Copy link
Contributor

@engcom-Bravo engcom-Bravo left a comment

Choose a reason for hiding this comment

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

Hello @NikolasSumrak

Looks like the changes provided in this PR do not fix the original issue
The Save button is still disabled when only one product is added to package
save_button

@ghost ghost dismissed gabrieldagama’s stale review September 25, 2020 08:48

Pull Request state was updated. Re-review required.

@engcom-Hotel
Copy link
Contributor

Hello @NikolasSumrak, could you please check the previous comment and provide additional information for reproducing process or check provided solution.
Thank you.

@engcom-Hotel
Copy link
Contributor

Will check it

@engcom-Bravo
Copy link
Contributor

@gabrieldagama Can you please review the latest changes? Thank you

@magento-engcom-team
Copy link
Contributor

Hi @gabrieldagama, thank you for the review.
ENGCOM-8253 has been created to process this Pull Request
✳️ @gabrieldagama, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@gabrieldagama gabrieldagama added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Oct 15, 2020
@engcom-Bravo
Copy link
Contributor

engcom-Bravo commented Oct 16, 2020

✔️ QA Passed

Manual testing scenario

  1. Install Inventory
  2. Configure a Shipping method with the ability to Create Shipping Label, UPS for example
  3. Create two Sources and Assign them to one Stock
    1_source_stock
  4. Create two Products, and Assign two previously created Sources to each of them
    2_products
  5. Submit an order containing previously created Products and selecting UPS Shipping Method
    3_submit_order
  6. Go to Ship. Select Source, set Qty To Deduct 1 for one Product and 0 for the other Product. Click Proceed to Shipment
    4_process
  7. Assert that only 1 Product is listed in Items to Ship
  8. Check Create Shiping Label checkbox and click Submit Shipment
    cre_ship_label
  9. Click Add Products to Package. Assert that only one product appeared in the list of Products
    фыыуке_щту
  10. Check the product and click Add selected Product(s) to Package
  11. Assert that the Save button is active and available
    save_active

BEFORE APPLYING CHANGES PROVIDED IN THIS PR
Two products were available in Create Packages window, despite that 0 quantity has been set
two products
And before Adding both Products to Package, Save button was not available
Peek 2020-10-16 10-47

@engcom-Bravo engcom-Bravo added the QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope label Oct 16, 2020
@gabrieldagama
Copy link
Contributor

@magento run all tests

1 similar comment
@gabrieldagama
Copy link
Contributor

@magento run all tests

@m2-assistant
Copy link

m2-assistant bot commented Oct 21, 2020

Hi @NikolasSumrak, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: Shipping Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Issue] Fixed creating shipping labels in part-shipment
8 participants