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

[Sales] Missing relation data when reorder #37028

Closed
1 of 5 tasks
Nuranto opened this issue Mar 8, 2023 · 11 comments · Fixed by #37298
Closed
1 of 5 tasks

[Sales] Missing relation data when reorder #37028

Nuranto opened this issue Mar 8, 2023 · 11 comments · Fixed by #37298
Assignees
Labels
Area: Order Component: Admin 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: done Reported on 2.4.5-p1 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

@Nuranto
Copy link
Contributor

Nuranto commented Mar 8, 2023

Preconditions and environment

  • Magento version 2.4.5-p1
  • PHP 8.1

Steps to reproduce

  1. Place an order
  2. Reorder that order

Expected result

  • relation_child_id and relation_child_real_id are set in parent order row. A link is diplayed on parent order view to new order.
    Capture d’écran 2023-03-08 à 10 07 31
  • relation_parent_id and relation_parent_real_id are set in child order row. A link is diplayed on child order view to parent order.

Capture d’écran 2023-03-08 à 10 06 53

Actual result

  • relation_child_id and relation_child_real_id are not set in parent order row. No link is diplayed on parent order view to new order.
  • relation_parent_id and relation_parent_real_id are not set in child order row. No link is diplayed on child order view to parent order.

Additional information

No response

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”.
@m2-assistant
Copy link

m2-assistant bot commented Mar 8, 2023

Hi @Nuranto. 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. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


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.

@m2-assistant
Copy link

m2-assistant bot commented Mar 8, 2023

Hi @engcom-November. 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- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - 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-November
Copy link
Contributor

Hi @Nuranto ,
Thank you for reporting and collaboration. Verified the behavior on Magento 2.4-develop instance and is reproducible. But however, as per Magento docs this seems to be expected behavior. As per Magento documentation, no link to view parent order / child order from View Order page is displayed. Kindly recheck the docs and provide supporting docs/ proofs to consider this as valid bug.
Thank you.
image

@engcom-November engcom-November added the Issue: needs update Additional information is require, waiting for response label Mar 9, 2023
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board Mar 9, 2023
@Nuranto
Copy link
Contributor Author

Nuranto commented Mar 9, 2023

Hi @engcom-November,

Ok I'm sorry, the links to previous/new on order page view I was talking about, are on backend order view. I should have been more specific.

Updated steps :

  1. Place an order
  2. Reorder that order from backend
  3. Check on backend order page view

However, there is no documentation about that neither: There's no screenshot on the doc of that page after reorder.

However, the fields relation_* do exists in sales_order table, the setters and getters on OrderInterface do exist too, and the admin template does exist and work well when these fields are set (You can try by set those fields manually in database).

<?php if ($order->getRelationChildId()) : ?>
<tr>
<th><?= $block->escapeHtml(__('Link to the New Order')) ?></th>
<td>
<a href="<?= $block->escapeUrl($block->getViewUrl($order->getRelationChildId())) ?>">
<?= $block->escapeHtml($order->getRelationChildRealId()) ?>
</a>
</td>
</tr>
<?php endif; ?>
<?php if ($order->getRelationParentId()) : ?>
<tr>
<th><?= $block->escapeHtml(__('Link to the Previous Order')) ?></th>
<td>
<a href="<?= $block->escapeUrl($block->getViewUrl($order->getRelationParentId())) ?>">
<?= $block->escapeHtml($order->getRelationParentRealId()) ?>
</a>
</td>
</tr>
<?php endif; ?>

@engcom-November
Copy link
Contributor

engcom-November commented Mar 14, 2023

Thank you for the response @Nuranto ,
Verified the issue again on Magento 2.4-develop instance with updated steps and the issue is reproducible on Admin Backend.
"Link to the Previous Order" is initially not displayed by default after reorder (relation_parent_id, relation_parent_real_id values in sales_order DB table are NULL) in Admin - Order details page but by manually updating relation_parent_id, relation_parent_real_id values in sales_order DB table, "Link to the previous order" is getting displayed on UI
However, as per Magento docs no such link is mentioned as expected behavior in Admin Order details page. Please provide your inputs on whether we need to still consider this as an issue as per Magento docs or enhancement / feature request to include the link in Admin Order details page.
image
image
Thank you.

@Nuranto
Copy link
Contributor Author

Nuranto commented Mar 14, 2023

Hi @engcom-November,

My point of view is that if the code exists, the schema exists and the template exists but the result of all that is wrong... then it should be considered as an issue. The feature exists, it just doesn't work.
The docs cannot be exhaustive, I mean, if I follow your link, I can't see "Unhold" button either. Does it means it would be a feature request if that button doesn't show up after holding an oder ?

We maybe should add screenshots after step 5 (at the end of page) here : https://experienceleague.adobe.com/docs/commerce-admin/stores-sales/shopper-tools/reorders-allow.html?lang=en since it's missing

@engcom-November
Copy link
Contributor

Thank you for the response @Nuranto . Agree with you and considering this as an issue. Updating the description as per ref comment and confirming the issue.

@engcom-November engcom-November added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Component: Admin Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Order Reported on 2.4.5-p1 Indicates original Magento version for the Issue report. labels Mar 15, 2023
@m2-community-project m2-community-project bot removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Mar 15, 2023
@m2-community-project m2-community-project bot moved this from Needs Update to Confirmed in Issue Confirmation and Triage Board Mar 15, 2023
@m2-community-project m2-community-project bot removed the Issue: needs update Additional information is require, waiting for response label Mar 15, 2023
@github-jira-sync-bot
Copy link

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

@m2-community-project m2-community-project bot added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Mar 15, 2023
@m2-assistant
Copy link

m2-assistant bot commented Mar 15, 2023

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

@github-jira-sync-bot
Copy link

❌ You don't have permission to export this issue.

@engcom-November engcom-November added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Mar 15, 2023
@m2-community-project m2-community-project bot added this to Ready for Development in High Priority Backlog Mar 15, 2023
@KrasnoshchokBohdan
Copy link
Contributor

@magento I am working on this

@m2-community-project m2-community-project bot moved this from Ready for Development to Dev In Progress in High Priority Backlog Mar 24, 2023
KrasnoshchokBohdan pushed a commit to KrasnoshchokBohdan/magento2 that referenced this issue Mar 26, 2023
- fix createOrder method to understand that order is reordered.
@m2-community-project m2-community-project bot moved this from Dev In Progress to Pull Request In Progress in High Priority Backlog Mar 26, 2023
KrasnoshchokBohdan pushed a commit to KrasnoshchokBohdan/magento2 that referenced this issue Jun 16, 2023
KrasnoshchokBohdan pushed a commit to KrasnoshchokBohdan/magento2 that referenced this issue Jul 19, 2023
KrasnoshchokBohdan pushed a commit to KrasnoshchokBohdan/magento2 that referenced this issue Jul 21, 2023
@github-jira-sync-bot github-jira-sync-bot added the Progress: PR Created Indicates that Pull Request has been created to fix issue label Aug 21, 2023
@m2-community-project m2-community-project bot moved this from Pull Request In Progress to Done in High Priority Backlog Aug 31, 2023
@m2-community-project m2-community-project bot added Progress: done and removed Progress: PR Created Indicates that Pull Request has been created to fix issue Progress: PR in progress labels Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Order Component: Admin 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: done Reported on 2.4.5-p1 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
Development

Successfully merging a pull request may close this issue.

4 participants