mirror of https://github.com/zulip/zulip.git
remote-support: Use remote server or realm UUID in support URL.
Because the remote support page now supports searching by UUID, the support URL for remote billing entities, which is used for sponsorship request emails and overdue invoice emails, can now use the remote server or realm UUID. Adds the remote realm UUID to the remote support view information.
This commit is contained in:
parent
71c026f0fa
commit
8d60ca548b
|
@ -3781,7 +3781,7 @@ class RemoteRealmBillingSession(BillingSession):
|
|||
|
||||
@override
|
||||
def support_url(self) -> str: # nocoverage
|
||||
return build_support_url("remote_servers_support", self.remote_realm.server.hostname)
|
||||
return build_support_url("remote_servers_support", str(self.remote_realm.uuid))
|
||||
|
||||
@override
|
||||
def get_customer(self) -> Optional[Customer]:
|
||||
|
@ -4212,7 +4212,7 @@ class RemoteServerBillingSession(BillingSession):
|
|||
|
||||
@override
|
||||
def support_url(self) -> str: # nocoverage
|
||||
return build_support_url("remote_servers_support", self.remote_server.hostname)
|
||||
return build_support_url("remote_servers_support", str(self.remote_server.uuid))
|
||||
|
||||
@override
|
||||
def get_customer(self) -> Optional[Customer]:
|
||||
|
|
|
@ -6985,7 +6985,7 @@ class TestRemoteRealmBillingFlow(StripeTestCase, RemoteRealmBillingTestCase):
|
|||
self.assertEqual(self.email_envelope_from(message), settings.NOREPLY_EMAIL_ADDRESS)
|
||||
self.assertIn("Zulip sponsorship request <noreply-", self.email_display_from(message))
|
||||
self.assertIn(
|
||||
"Support URL: http://zulip.testserver/activity/remote/support?q=demo.example.com",
|
||||
f"Support URL: http://zulip.testserver/activity/remote/support?q={remote_realm.uuid!s}",
|
||||
message.body,
|
||||
)
|
||||
self.assertIn("Website: https://infinispan.org", message.body)
|
||||
|
@ -7596,7 +7596,7 @@ class TestRemoteServerBillingFlow(StripeTestCase, RemoteServerTestCase):
|
|||
self.assertEqual(self.email_envelope_from(message), settings.NOREPLY_EMAIL_ADDRESS)
|
||||
self.assertIn("Zulip sponsorship request <noreply-", self.email_display_from(message))
|
||||
self.assertIn(
|
||||
"Support URL: http://zulip.testserver/activity/remote/support?q=demo.example.com",
|
||||
f"Support URL: http://zulip.testserver/activity/remote/support?q={self.remote_server.uuid!s}",
|
||||
message.body,
|
||||
)
|
||||
self.assertIn("Website: https://infinispan.org", message.body)
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
{% endif %}
|
||||
<br />
|
||||
<b>Date created</b>: {{ support_data[remote_realm.id].date_created.strftime('%d %B %Y') }}<br />
|
||||
<b>UUID</b>: {{ remote_realm.uuid }}<br />
|
||||
<br />
|
||||
<b>Org type</b>: {{ get_org_type_display_name(remote_realm.org_type) }}<br />
|
||||
<b>Plan type</b>: {{ get_plan_type_name(remote_realm.plan_type) }}<br />
|
||||
<b>Non-guest user count</b>: {{ support_data[remote_realm.id].user_data.non_guest_user_count }}<br />
|
||||
|
|
Loading…
Reference in New Issue