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

BUG [ORDERs][S1] : Create new order and edit exists in different browser tabs, produces cancellation and creation incrementid-1 #39315

Open
1 of 5 tasks
mmaximo33 opened this issue Oct 31, 2024 · 5 comments
Labels
Area: Order Component: order status Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reported on 2.4.6-p3 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@mmaximo33
Copy link

mmaximo33 commented Oct 31, 2024

Preconditions and environment

  • Magento version: 2.4.6-p3
  • Anything else that would help a developer reproduce the bug

Steps to reproduce

Two cases were detected for which the same solution would apply.

  • Case A: Create and edit orders simultaneously in different tabs
  • Case B: Edit orders simultaneously in different tabs

Details

The problem is exclusively found in poor management of the incrementID of the order based on the QuoteSession data that takes as a reference the QuoteId of an existing order that is being edited after consolidating the new order.

Case A

Two actions will be used simultaneously in the same browser with the same Magento session, the creation of an order (Tab1) and the editing of an existing one (Tab2).

  1. Tab1: Go to Sales > Order > Create new Order
    • Select an existing customer or create a new one
    • Indicate the store
    • Observation
      • See that the title says CREATE NEW ORDER FOR CUSTOMER IN STORE
  2. Tab2: Go to Sales > Order
    • Open an order exist
    • Click on the edit button
    • Observation
      • See that the title is EDIT ORDER IncrementID
      • At this time the session data was created
  3. Tab1: To confirm the above refresh the tab
    • Summitee the new order
    • Create the new order
  4. Go to Sales > Order >
    • Find the incrementID of the order you were editing
    • Visualize that the one that was edited went to a canceled state
    • Visualize that the one that was created was generated with incrementID-1

Support with video for a better understanding of the problem

bug_magento_create_order.mp4

Expected result

The expected result would be that

  • A new order is created with a new increment_id
  • The existing order is edited without problems

Actual result

The current result is that

  • The status of the order that was being edited (Tab2) is changed to canceled status
  • The new order is created with incrementID-1

Case B

The same problem occurs if I try to edit two orders simultaneously

  1. Tab1: Go to Sales > Order

    • Open an order exist
    • Click on the edit button
    • Observation
      • See that the title is EDIT ORDER IncrementID (0001)
      • At this time the session data was created
  2. Tab2: Go to Sales > Order

    • Open an order exist
    • Click on the edit button
    • Observation
      • See that the title is EDIT ORDER IncrementID (0002)
      • At this time the session data was created
  3. Tab1: To confirm the above refresh the tab

    • See that the title is EDIT ORDER IncrementID (0002)
    • Reference was updated from 0001 to 0002

Expected result

The expected result would be that

  • 0001 is canceled and 0001-1 is created
  • 0002 is canceled and 0002-1 is created

Actual result

The current result is that

  • When saving changes from 0001
    • 0002 is canceled
    • 0002-1 is created
  • When saving changes from 0002
    • 0002-1 is canceled
    • 0002-2 is created

Additional information

This is directly related to the Quote session

Magento\Backend\Model\Session\Quote::getData()

This problem occurs more frequently when the sales team is large and operates with several customers at the same time, significantly increasing the probability of orders being created and edited simultaneously.

This problem affects the new general implementation and with the management of third-party extensions to add features it can affect the frontend

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented Oct 31, 2024

Hi @mmaximo33. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues 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.

@mmaximo33 mmaximo33 changed the title BUG [ORDERs]: Create new order and edit exists in different browser tabs, produces cancellation and creation incrementid-1 BUG [ORDERs][S1] : Create new order and edit exists in different browser tabs, produces cancellation and creation incrementid-1 Oct 31, 2024
@engcom-Bravo engcom-Bravo self-assigned this Nov 1, 2024
Copy link

m2-assistant bot commented Nov 1, 2024

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.6-p3 Indicates original Magento version for the Issue report. label Nov 1, 2024
@engcom-Bravo
Copy link
Contributor

Hi @mmaximo33,

Thanks for your reporting and collaboration.

We have verified the issue for both case1 and case2 in the Latest 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.

Screenshot 2024-11-06 at 10 02 50 Screenshot 2024-11-06 at 10 02 57 Screenshot 2024-11-06 at 10 05 05 Screenshot 2024-11-06 at 10 05 17 Screenshot 2024-11-06 at 10 06 52

The status of the order that was being edited (Tab2) is changed to canceled status.The new order is created with incrementID-1

Hence Confirming the issue.

Thanks.

@engcom-Bravo engcom-Bravo added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Component: order status Area: Order and removed Issue: ready for confirmation labels Nov 6, 2024
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-13312 is successfully created for this GitHub issue.

Copy link

m2-assistant bot commented Nov 6, 2024

✅ Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Order Component: order status Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reported on 2.4.6-p3 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
None yet
Development

No branches or pull requests

3 participants