fix: wrong no of trial days in in-desk subscription banner #2102
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2013
Issue - To estimate the no of days remained in trial period, we depend on the
frappe.boot.telemetry_site_age
https://github.com/frappe/frappe/blob/a162e61e26a5b9f4b8a6e0c3ac02d1d900817a99/frappe/utils/telemetry.py#L29-L35
The issue is the Administrator user got created, while creating the site. Sometimes, the difference between standby site creation and transferring to user is > 2 days. That results in wrong info in subscription banner.
Solution - Add
trial_end_date
in site_configsubscription
key. While provisioning the site for trial, that will inject this config.