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

SalesSequence. The sales sequence profiles associated to storeview ID 1 should have as prefix 1 after new Magento setup #31447

Open
wants to merge 7 commits into
base: 2.5-develop
Choose a base branch
from

Conversation

vlmed
Copy link
Contributor

@vlmed vlmed commented Dec 23, 2020

Description (*)

Added logic to check store ID before create sequence table.

Set store ID as prefix If storeId === 1.

Modified class Magento\SalesSequence\Setup\SequenceCreator

Related Pull Requests

https://github.com/magento/partners-magento2ee/pull/471
https://github.com/magento/partners-magento2b2b/pull/557
magento/inventory#3293

Fixed Issues (if relevant)

  1. Fixes Default created storeview sales sequences are missing a prefix #30863

Manual testing scenarios (*)

New magento install

  1. Start new magento setup
  2. The profiles associated to storeview ID 1 should have as prefix 1

Upgrade magento

  1. Check or change prefix for profiles associated to storeview ID.
  2. Upgrade magento;
  3. The profiles associated to storeview ID 1 should have prefix as before upgrade

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)

@m2-assistant
Copy link

m2-assistant bot commented Dec 23, 2020

Hi @vlmed. 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

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

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

⚠️ According to the Magento Contribution requirements, all Pull Requests 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 Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-community-project m2-community-project bot added Priority: P3 May be fixed according to the position in the backlog. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Dec 23, 2020
@magento-engcom-team magento-engcom-team added Component: SalesSequence Release Line: 2.4 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Dec 23, 2020
@coderimus coderimus self-assigned this Jan 4, 2021
@coderimus coderimus self-requested a review January 4, 2021 13:12
@coderimus
Copy link
Contributor

Hello @vlmed
Thank you for the work you have done but to proceed with the PR review we need you to accept the Adobe CLA.

@vlmed vlmed closed this Jan 4, 2021
@m2-assistant
Copy link

m2-assistant bot commented Jan 4, 2021

Hi @vlmed, 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.

@m2-assistant
Copy link

m2-assistant bot commented Jan 4, 2021

Hi @vlmed. 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

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

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

@coderimus
Copy link
Contributor

@magento run all tests

Copy link
Contributor

@coderimus coderimus 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 @vlmed for the fix and test coverage. 👍 I have only minor adjustments request for the method and class comments.

use PHPUnit\Framework\TestCase;

/**
* Testing data from the sales_sequence_profile table for default stores
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Testing data from the sales_sequence_profile table for default stores
* Test default created store views sales sequences prefix.

}

/**
* Default stores data provider
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Default stores data provider
* Default store codes data provider

}

/**
* Testing data from the sales_sequence_profile table for default stores
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Testing data from the sales_sequence_profile table for default stores
* Test prefix for default created store views.

@coderimus
Copy link
Contributor

@magento run Integration Tests

@coderimus
Copy link
Contributor

@magento run Integration Tests Functional Tests EE Functional Tests CE Functional Tests B2B Database Compare

@hostep
Copy link
Contributor

hostep commented Mar 4, 2021

@sivaschenko

Please retarget the pull request to 2.5-develop branch as the fix contains BIC

Sorry, but I don't agree with this statement.

If this change has been implemented as requested in #30863:

When this gets fixed, it should only be fixed for new Magento shops being setup, please don't add a db migration script to fix it for existing shops, that would be very unexpected for shop owners.

Then this is backwards compatible in my eyes, only new shops being setup will have this change, older existing shops will never get this change. Correct?

@vlmed
Copy link
Contributor Author

vlmed commented Mar 4, 2021

@hostep It is affect only for new Magento installations. If you look in the \Magento\SalesSequence\Model\Builder::create()
you will see that before creating new Sequence tables and Profiles Magento checks if its already exist.

@vlmed
Copy link
Contributor Author

vlmed commented Mar 24, 2021

@magento run all tests

… to compatibility with sequence prefix changing
@vlmed
Copy link
Contributor Author

vlmed commented Mar 26, 2021

@magento run Functional Tests CE, Functional Tests EE, Functional Tests B2B

@vlmed
Copy link
Contributor Author

vlmed commented Mar 31, 2021

@magento run all tests

@hostep
Copy link
Contributor

hostep commented Jun 28, 2021

Hi @sivaschenko: you never replied to my statement above?

Also: what's the status of this PR?

@sivaschenko sivaschenko removed the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Jul 4, 2021
@sivaschenko
Copy link
Member

Hi @hostep , even if these changes will be applied to the new stores only, that is still remaining a BIC for extensions that may rely their implementation on the current behaviour.

@hostep
Copy link
Contributor

hostep commented Jul 5, 2021

Okay, thanks for the feedback, I can live with that 🙂

@magento-automated-testing
Copy link

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.

6 similar comments
@magento-automated-testing
Copy link

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-automated-testing
Copy link

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-automated-testing
Copy link

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-automated-testing
Copy link

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-automated-testing
Copy link

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-automated-testing
Copy link

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.

@m2-community-project m2-community-project bot added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. labels Nov 3, 2021
@sivaschenko sivaschenko removed the Priority: P3 May be fixed according to the position in the backlog. label Nov 3, 2021
@engcom-Charlie engcom-Charlie self-assigned this Mar 16, 2022
@engcom-Charlie
Copy link
Contributor

@magento run all tests

1 similar comment
@engcom-Charlie
Copy link
Contributor

@magento run all tests

@hostep
Copy link
Contributor

hostep commented Mar 21, 2022

@engcom-Charlie: no idea why you added 250+ random commits to this PR? But you should probably rebase with git before proceeding with this PR, so the commits are clean again?

@engcom-Charlie engcom-Charlie force-pushed the add-prefix-for-default-created-storeview-sales-sequences branch from 67b0bda to a1f5e2f Compare March 22, 2022 09:56
@engcom-Charlie
Copy link
Contributor

@magento run all tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: SalesSequence Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: needs update Release Line: 2.5 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default created storeview sales sequences are missing a prefix
8 participants