Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
register: Add AI/LLM as option for how user found Zulip.
Aman Agrawal40f4ad2cb011
diff --git a/corporate/views/installation_activity.py b/corporate/views/installation_activity.pyindex b1a3e6b9d0a..fd3917274b0 100644--- a/corporate/views/installation_activity.py+++ b/corporate/views/installation_activity.py@@ -255,6 +255,7 @@ def realm_summary_table(export: bool) -> str:RealmAuditLog.HOW_REALM_CREATOR_FOUND_ZULIP_OPTIONS["other"],RealmAuditLog.HOW_REALM_CREATOR_FOUND_ZULIP_OPTIONS["ad"],RealmAuditLog.HOW_REALM_CREATOR_FOUND_ZULIP_OPTIONS["review_site"],+ RealmAuditLog.HOW_REALM_CREATOR_FOUND_ZULIP_OPTIONS["ai_chatbot"],):row["how_realm_creator_found_zulip"] += f": {extra_context}"elif how_found == RealmAuditLog.HOW_REALM_CREATOR_FOUND_ZULIP_OPTIONS["existing_user"]:diff --git a/templates/zerver/register.html b/templates/zerver/register.htmlindex 60fd2dee1dc..3c6f3a77b17 100644--- a/templates/zerver/register.html+++ b/templates/zerver/register.html@@ -214,6 +214,7 @@ Form is validated both client-side using jquery-validation (see signup.js) and s<input id="how-realm-creator-found-zulip-where-ad" class="how-found-zulip-extra-data-input" type="text" placeholder="{{ _('Where did you see the ad?') }}" name="how_realm_creator_found_zulip_where_ad" maxlength="100"/><input id="how-realm-creator-found-zulip-which-organization" class="how-found-zulip-extra-data-input" type="text" placeholder="{{ _('Which organization?') }}" name="how_realm_creator_found_zulip_which_organization" maxlength="100"/><input id="how-realm-creator-found-zulip-review-site" class="how-found-zulip-extra-data-input" type="text" placeholder="{{ _('Which one?') }}" name="how_realm_creator_found_zulip_review_site" maxlength="100"/>+ <input id="how-realm-creator-found-zulip-which-ai-chatbot" class="how-found-zulip-extra-data-input" type="text" placeholder="{{ _('Which one?') }}" name="how_realm_creator_found_zulip_which_ai_chatbot" maxlength="100"/></div>{% endif %}diff --git a/web/src/portico/signup.ts b/web/src/portico/signup.tsindex 6410aaa2653..62d05593198 100644--- a/web/src/portico/signup.ts+++ b/web/src/portico/signup.ts@@ -347,6 +347,7 @@ $(() => {["ad", "how-realm-creator-found-zulip-where-ad"],["existing_user", "how-realm-creator-found-zulip-which-organization"],["review_site", "how-realm-creator-found-zulip-review-site"],+ ["ai_chatbot", "how-realm-creator-found-zulip-which-ai-chatbot"],]);const hideElement = (element: string): void => {diff --git a/zerver/forms.py b/zerver/forms.pyindex d40fc8b6c10..996b62e1a30 100644--- a/zerver/forms.py+++ b/zerver/forms.py@@ -203,6 +203,9 @@ class RegistrationForm(RealmDetailsForm):self.fields["how_realm_creator_found_zulip_review_site"] = forms.CharField(max_length=100, required=False)+ self.fields["how_realm_creator_found_zulip_which_ai_chatbot"] = forms.CharField(+ max_length=100, required=False+ )def clean_full_name(self) -> str:try:diff --git a/zerver/models/realm_audit_logs.py b/zerver/models/realm_audit_logs.pyindex f9c5704c6aa..9d76de71278 100644--- a/zerver/models/realm_audit_logs.py+++ b/zerver/models/realm_audit_logs.py@@ -190,6 +190,7 @@ class AbstractRealmAuditLog(models.Model):HOW_REALM_CREATOR_FOUND_ZULIP_OPTIONS = {"existing_user": "At an organization that's using it","search_engine": "Search engine",+ "ai_chatbot": "AI/LLM","review_site": "Review site","personal_recommendation": "Personal recommendation","hacker_news": "Hacker News",diff --git a/zerver/views/registration.py b/zerver/views/registration.pyindex 357d2c9029d..931fbffbf63 100644--- a/zerver/views/registration.py+++ b/zerver/views/registration.py@@ -637,6 +637,7 @@ def registration_helper("ad": "how_realm_creator_found_zulip_where_ad","existing_user": "how_realm_creator_found_zulip_which_organization","review_site": "how_realm_creator_found_zulip_review_site",+ "ai_chatbot": "how_realm_creator_found_zulip_which_ai_chatbot",}for option, field_name in extra_context_options.items():if (