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

Report Orders and Distributors should display variant #12930

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

chahmedejaz
Copy link
Collaborator

@chahmedejaz chahmedejaz commented Oct 17, 2024

What? Why?

  • Closes Report Orders and Distributors should display variant #12878
  • This PR adds the report variant name under the "Variant" column to the Order and Distributor report to mimic what's been displayed on the orders page for the variant.
  • Moreover, after changing the item name to "Product", existing selected column name with item_name selected, won't be selected anymore. So to keep the selected column names the same in this case, a data migration has been added which changes the selected item_name to the product in all the existing selected columns that already had selected item_name

What should we test?

  • As described or discussed in the issue
  • Moreover, please make sure that if the item name column was selected before deployment, then after deployment product column name would have to be selected or vise versa

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

@chahmedejaz chahmedejaz changed the title Task/12878 add variant name in od report Report Orders and Distributors should display variant Oct 17, 2024
@chahmedejaz chahmedejaz added the bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. label Oct 17, 2024
Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

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

Great work, and good thinking to migrate the options data to make it seamless for users.

I have a concern about the migration, do you think it's worth adding a test? Or are you confident you've already manually checked all possibilities?

@chahmedejaz
Copy link
Collaborator Author

chahmedejaz commented Oct 18, 2024

I have a concern about the migration, do you think it's worth adding a test? Or are you confident you've already manually checked all possibilities?

@dacook - I'd manually tested all the possible use cases for this migration, I thought it would run only once so wasn't sure if it was worth a spec that would add up to the pipeline each time the workflow runs.
However, yes, I may have missed something in my manual testing, so I've added the specs for the use cases I could think of. Please review and let me know what you think about it. Thanks. :)

Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

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

Wonderful, thank you.

Yes it's hard to know exactly what to spec or not. It's still production code that will modify data on every server, so I thought it worth being certain about exactly what it will and won't do.

I agree we don't need the test running every time, and maybe it would be possible to configure a runner to only test migrations when they are added. But I don't know if there's an easy way to do that. For now, I think we just occasionally archive the migrations and specs.

Copy link
Collaborator

@rioug rioug left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@rioug rioug added the user facing changes Thes pull requests affect the user experience label Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. user facing changes Thes pull requests affect the user experience
Projects
Status: Test Ready 🧪
Development

Successfully merging this pull request may close these issues.

Report Orders and Distributors should display variant
3 participants