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

feat: add variant_id to seat info for ExecEd courses #4084

Conversation

AfaqShuaib09
Copy link

@AfaqShuaib09 AfaqShuaib09 commented Jan 1, 2024

Description

In continue to the PR: #3794
This PR adds the functionality to add variant_id to seat_info for execEd courses via publication endpoint

⛔️ DEPRECATION WARNING

This repository is deprecated and in maintainence-only operation while we work on a replacement, please see this announcement for more information.

Although we have stopped integrating new contributions, we always appreciate security disclosures and patches sent to [email protected]

Anyone internally merging to this repository is expected to release and monitor their changes; if you are not able to do this DO NOT MERGE, please coordinate with someone who can to ensure that the changes are released.

Required Testing

  • Before deploying this change, complete a purchase in the stage environment.
    (^ We can remove that manual check once REV-2624 is done and the corresponding e2e test runs again)

Description

Describe what this pull request changes, and why these changes were made. How will these changes affect other people, installations of edx, etc.?
Please include links to any relevant ADRs, design artifacts, and decision documents. Make sure to document the rationale behind significant changes in the repo, per OEP-19, and can be
linked here.

Useful information to include:

  • Which edX user roles will this change impact? Common user roles are "Learner", "Course Author", "Developer", and "Operator".
  • Include screenshots for changes to the UI (ideally, both "before" and "after" screenshots, if applicable).
  • Provide links to the description of corresponding configuration changes. Remember to correctly annotate these changes.

Supporting information

Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.

Testing instructions

Please provide detailed step-by-step instructions for testing this change; how did YOU test this change?

Other information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, OpenEdx vs. edx.org differences, development vs. production environment differences, security, or accessibility.

@AfaqShuaib09 AfaqShuaib09 requested a review from a team as a code owner January 1, 2024 12:38
Copy link
Contributor

@DawoudSheraz DawoudSheraz left a comment

Choose a reason for hiding this comment

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

Codewise, it looks alright. I am going to rely on owner and/or Enterprise for better context here.

@zawan-ila
Copy link

Have you verified that this works as intended? I believe you need to define the new attribute variant_id on the Seat product to ensure it gets into the database? As it stands, I do not think the attribute is really being set in the db 🤔

@zawan-ila
Copy link

If I am correct here^, I expect we'll need something like 3782

@AfaqShuaib09
Copy link
Author

AfaqShuaib09 commented Jan 3, 2024

Have you verified that this works as intended? I believe you need to define the new attribute variant_id on the Seat product to ensure it gets into the database? As it stands, I do not think the attribute is really being set in the db 🤔

Not this time, but during my work on this pull request, I had tested these changes with the value of course_metadata.is_course_run_variant_id_ecommerce_consumable set to true, and everything was functioning correctly.

image

[thinking] It seems like it is currently adding variant_id Product Attribute that is linked with Course Entitlements for seats Products as well. Otherwise it'll raise error in unittest too.
I believe it would be better to add it separately for Seat Product Type, just as you mentioned, as shown below for other Product Attributes:
image

Nice catch 💯

@AfaqShuaib09 AfaqShuaib09 force-pushed the afaq/prod-ecommerce-variant-id-changes branch from 6433ec4 to 215511e Compare January 4, 2024 09:57
@AfaqShuaib09 AfaqShuaib09 force-pushed the afaq/prod-ecommerce-variant-id-changes branch from 215511e to 015f90a Compare January 9, 2024 11:51
@AfaqShuaib09 AfaqShuaib09 force-pushed the afaq/prod-ecommerce-variant-id-changes branch from 015f90a to 49f6fc3 Compare January 10, 2024 08:07
@christopappas christopappas merged commit b2dbca2 into openedx:2u/main Jan 10, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants