openedx / edx-platform

The Open edX LMS & Studio, powering education sites around the world!
https://openedx.org
GNU Affero General Public License v3.0
7.11k stars 3.8k forks source link

fix: Remove trial logic using moment-timezone in B2C Subs Programs #34939

Closed julianajlk closed 1 month ago

julianajlk commented 1 month ago

REV-4067.

When moment-timezone was upgraded from v0.5.37 -> 0.5.45 by Renovate, it caused an issue in the ProgramDetails page, with console error M.tz is not a function in L23 DateUtils.stringToMoment(data.trial_end).

Since then, moment has been updated by Renovate as well (previously there was dependency version conflicts with moment version from edx-ui-toolkit and the version in edx-platform.

Removing/setting to false or empty some trial related logic in the Program Subscription Model, some of which is only used when hasActiveTrial is true.

This file still uses DateUtils from edx-ui-toolkit and moment, but I've added optional chaining to avoid calling tz if it doesn't exist.

If the issue still persists after the upgrade and is in DateUtils, this is outside of our scope and the appropriate team will be notified.

edx-pipeline-bot commented 1 month ago

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

edx-pipeline-bot commented 1 month ago

2U Release Notice: This PR has been deployed to the edX production environment.

edx-pipeline-bot commented 1 month ago

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

edx-pipeline-bot commented 1 month ago

2U Release Notice: This PR has been deployed to the edX production environment.