frappe / press

Full service cloud hosting for the Frappe stack - powers Frappe Cloud
https://frappe.cloud
GNU Affero General Public License v3.0
259 stars 187 forks source link

fix: wrong no of trial days in in-desk subscription banner #2113

Closed tanmoysrt closed 1 month ago

tanmoysrt commented 1 month ago

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_config subscription key. While provisioning the site for trial, that will inject this config.

Agent PR - https://github.com/frappe/agent/pull/124