Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(customer-analytics): make request descriptions optional (#83407)

Arthur Moreira de Deusfa8b8bd32ed2
diff --git a/products/customer_analytics/backend/logic/feature_requests.py b/products/customer_analytics/backend/logic/feature_requests.py
index 71c460dc459d..79bfae89a9b0 100644
--- a/products/customer_analytics/backend/logic/feature_requests.py
+++ b/products/customer_analytics/backend/logic/feature_requests.py
@@ -378,8 +378,6 @@ def create_feature_request(
description = input.description.strip()
if not title:
raise FeatureRequestValidationError("title", "Enter a title.")
- if not description:
- raise FeatureRequestValidationError("description", "Enter a description.")
if not input.product_area_ids:
raise FeatureRequestValidationError("product_area_ids", "Select at least one product area.")
@@ -484,8 +482,6 @@ def update_feature_request(
update_fields.add("title")
if input.description is not None:
description = input.description.strip()
- if not description:
- raise FeatureRequestValidationError("description", "Enter a description.")
if description != feature_request.description:
feature_request.description = description
update_fields.add("description")
diff --git a/products/customer_analytics/backend/migrations/0035_alter_feature_request_description.py b/products/customer_analytics/backend/migrations/0035_alter_feature_request_description.py
new file mode 100644
index 000000000000..4abbbc9e2665
--- /dev/null
+++ b/products/customer_analytics/backend/migrations/0035_alter_feature_request_description.py
@@ -0,0 +1,17 @@
+# Generated by Django 5.2.17 on 2026-08-14 21:30
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("customer_analytics", "0034_backfill_feature_request_history"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="featurerequest",
+ name="description",
+ field=models.TextField(blank=True, default=""),
+ ),
+ ]
diff --git a/products/customer_analytics/backend/migrations/max_migration.txt b/products/customer_analytics/backend/migrations/max_migration.txt
index 018469db3179..5426f81c4960 100644
--- a/products/customer_analytics/backend/migrations/max_migration.txt
+++ b/products/customer_analytics/backend/migrations/max_migration.txt
@@ -1 +1 @@
-0034_backfill_feature_request_history
+0035_alter_feature_request_description
diff --git a/products/customer_analytics/backend/models/feature_request.py b/products/customer_analytics/backend/models/feature_request.py
index 69e11ee1a5dd..3c36a803aaca 100644
--- a/products/customer_analytics/backend/models/feature_request.py
+++ b/products/customer_analytics/backend/models/feature_request.py
@@ -47,7 +47,7 @@ class FeatureRequestProductArea(TeamScopedRootMixin, UUIDModel):
class FeatureRequest(TeamScopedRootMixin, UUIDModel):
team = models.ForeignKey("posthog.Team", on_delete=models.CASCADE, db_constraint=False)
title = models.CharField(max_length=400)
- description = models.TextField()
+ description = models.TextField(blank=True, default="")
status = models.CharField(
max_length=32,
choices=FeatureRequestStatus.choices,
diff --git a/products/customer_analytics/backend/presentation/views/serializers.py b/products/customer_analytics/backend/presentation/views/serializers.py
index 92732273e24b..debdfe2fceb8 100644
--- a/products/customer_analytics/backend/presentation/views/serializers.py
+++ b/products/customer_analytics/backend/presentation/views/serializers.py
@@ -435,8 +435,11 @@ class FeatureRequestCreateSerializer(serializers.Serializer):
help_text="Required customer-facing request title.",
)
description = serializers.CharField(
+ required=False,
+ allow_blank=True,
+ default="",
trim_whitespace=True,
- help_text="Required customer-facing request description in Markdown.",
+ help_text="Optional customer-facing request description in Markdown.",
)
account_id = serializers.UUIDField(help_text="ID of the affected Customer Analytics account.")
product_area_ids = serializers.ListField(
@@ -462,8 +465,9 @@ class FeatureRequestUpdateSerializer(serializers.Serializer):
)
description = serializers.CharField(
required=False,
+ allow_blank=True,
trim_whitespace=True,
- help_text="Updated customer-facing request description in Markdown.",
+ help_text="Updated optional customer-facing request description in Markdown.",
)
account_id = serializers.UUIDField(required=False, help_text="Updated affected Customer Analytics account ID.")
product_area_ids = serializers.ListField(
diff --git a/products/customer_analytics/backend/test/test_feature_requests.py b/products/customer_analytics/backend/test/test_feature_requests.py
index 5c77d0b53852..5aafe83b2376 100644
--- a/products/customer_analytics/backend/test/test_feature_requests.py
+++ b/products/customer_analytics/backend/test/test_feature_requests.py
@@ -85,6 +85,25 @@ class TestFeatureRequestsAPI(APIBaseTest):
self.assertEqual(retrieved.json()["request_status"], "requested")
self.assertEqual(FeatureRequest.objects.for_team(self.team.id).count(), 1)
+ def test_description_can_be_omitted_or_cleared(self) -> None:
+ payload_without_description = self._payload()
+ payload_without_description.pop("description")
+
+ created_without_description = self.client.post(self.requests_url, payload_without_description, format="json")
+
+ self.assertEqual(created_without_description.status_code, status.HTTP_201_CREATED)
+ self.assertEqual(created_without_description.json()["description"], "")
+
+ created_with_description = self.client.post(self.requests_url, self._payload(), format="json").json()
+ cleared = self.client.patch(
+ f"{self.requests_url}{created_with_description['id']}/",
+ {"expected_version": created_with_description["version"], "description": ""},
+ format="json",
+ )
+
+ self.assertEqual(cleared.status_code, status.HTTP_200_OK)
+ self.assertEqual(cleared.json()["description"], "")
+
def test_create_rejects_relations_from_another_team(self) -> None:
other_team = Team.objects.create(organization=self.organization)
with team_scope(other_team.id):
diff --git a/products/customer_analytics/frontend/components/FeatureRequests/FeatureRequestCreateModal.tsx b/products/customer_analytics/frontend/components/FeatureRequests/FeatureRequestCreateModal.tsx
index 55148db27b1e..4467695b6bc0 100644
--- a/products/customer_analytics/frontend/components/FeatureRequests/FeatureRequestCreateModal.tsx
+++ b/products/customer_analytics/frontend/components/FeatureRequests/FeatureRequestCreateModal.tsx
@@ -86,7 +86,7 @@ export function FeatureRequestCreateModal(): JSX.Element {
/>
</div>
<div className="flex flex-col gap-1">
- <LemonLabel>Description</LemonLabel>
+ <LemonLabel>Description (optional)</LemonLabel>
<LemonTextArea
value={description}
onChange={setDescription}
diff --git a/products/customer_analytics/frontend/components/FeatureRequests/FeatureRequestDetail.tsx b/products/customer_analytics/frontend/components/FeatureRequests/FeatureRequestDetail.tsx
index cb5ec8d92ee1..a6b579b64aa6 100644
--- a/products/customer_analytics/frontend/components/FeatureRequests/FeatureRequestDetail.tsx
+++ b/products/customer_analytics/frontend/components/FeatureRequests/FeatureRequestDetail.tsx
@@ -94,12 +94,16 @@ export function FeatureRequestDetail({ request }: { request: FeatureRequestApi }
<div className="grid grid-cols-1 @5xl:grid-cols-[minmax(0,80ch)_minmax(22rem,1fr)] gap-5">
<div className="min-w-0">
<FeatureRequestDetailSection icon={<IconDocument />} title="Description">
- <LemonMarkdown
- disableImages
- className="text-sm text-secondary leading-relaxed break-words [&>*+*]:mt-3"
- >
- {request.description}
- </LemonMarkdown>
+ {request.description ? (
+ <LemonMarkdown
+ disableImages
+ className="text-sm text-secondary leading-relaxed break-words [&>*+*]:mt-3"
+ >
+ {request.description}
+ </LemonMarkdown>
+ ) : (
+ <span className="text-secondary">No description provided.</span>
+ )}
</FeatureRequestDetailSection>
</div>
diff --git a/products/customer_analytics/frontend/components/FeatureRequests/FeatureRequestEditModal.tsx b/products/customer_analytics/frontend/components/FeatureRequests/FeatureRequestEditModal.tsx
index a9965b412d2d..8af52c274e9a 100644
--- a/products/customer_analytics/frontend/components/FeatureRequests/FeatureRequestEditModal.tsx
+++ b/products/customer_analytics/frontend/components/FeatureRequests/FeatureRequestEditModal.tsx
@@ -105,7 +105,7 @@ export function FeatureRequestEditModal(): JSX.Element {
<LemonInput value={editTitle} onChange={setEditTitle} maxLength={400} fullWidth />
</div>
<div className="flex flex-col gap-1">
- <LemonLabel>Description</LemonLabel>
+ <LemonLabel>Description (optional)</LemonLabel>
<LemonTextArea value={editDescription} onChange={setEditDescription} minRows={5} />
</div>
<div className="flex flex-col gap-1">
diff --git a/products/customer_analytics/frontend/components/FeatureRequests/featureRequestsLogic.test.ts b/products/customer_analytics/frontend/components/FeatureRequests/featureRequestsLogic.test.ts
index 421cbcad676e..2578f407357e 100644
--- a/products/customer_analytics/frontend/components/FeatureRequests/featureRequestsLogic.test.ts
+++ b/products/customer_analytics/frontend/components/FeatureRequests/featureRequestsLogic.test.ts
@@ -8,7 +8,7 @@ import { useMocks } from '~/mocks/jest'
import { initKeaTests } from '~/test/init'
import * as generatedApi from '../../generated/api'
-import type { FeatureRequestApi } from '../../generated/api.schemas'
+import type { AccountApi, FeatureRequestApi } from '../../generated/api.schemas'
import {
FEATURE_REQUESTS_PAGE_SIZE,
featureRequestSearchParams,
@@ -16,6 +16,15 @@ import {
parseFeatureRequestSearchParams,
} from './featureRequestsLogic'
+const account: AccountApi = {
+ id: 'account-1',
+ name: 'Acme',
+ notebooks: [],
+ created_at: '2026-01-01T00:00:00Z',
+ created_by: null,
+ updated_at: null,
+}
+
const createdRequest: FeatureRequestApi = {
id: 'request-1',
title: 'Export account-level retention data',
@@ -84,6 +93,29 @@ describe('featureRequestsLogic', () => {
expect(logic.values.submittingRequest).toBe(false)
})
+ it('allows a request without a description', async () => {
+ const createSpy = jest.spyOn(generatedApi, 'featureRequestsCreate').mockResolvedValue(createdRequest)
+ logic.actions.openCreateRequest()
+ logic.actions.setTitle(createdRequest.title)
+ logic.actions.setAccountId(createdRequest.account.id)
+ logic.actions.setProductAreaIds(['area-1'])
+
+ await expectLogic(logic, () => logic.actions.submitRequest()).toFinishAllListeners()
+
+ expect(createSpy).toHaveBeenCalledWith(
+ String(MOCK_DEFAULT_TEAM.id),
+ expect.objectContaining({ description: '' })
+ )
+ })
+
+ it('keeps the selected account name while search results reload', () => {
+ logic.actions.loadAccountsSuccess([account])
+ logic.actions.setAccountId(account.id)
+ logic.actions.loadAccountsSuccess([])
+
+ expect(logic.values.accountOptions).toEqual([{ key: account.id, label: account.name }])
+ })
+
it('reloads request rows after a linked product area changes', async () => {
await expectLogic(logic).toFinishAllListeners()
const productArea = createdRequest.product_areas[0]
diff --git a/products/customer_analytics/frontend/components/FeatureRequests/featureRequestsLogic.ts b/products/customer_analytics/frontend/components/FeatureRequests/featureRequestsLogic.ts
index 311e5015fd0b..348fd233208c 100644
--- a/products/customer_analytics/frontend/components/FeatureRequests/featureRequestsLogic.ts
+++ b/products/customer_analytics/frontend/components/FeatureRequests/featureRequestsLogic.ts
@@ -24,6 +24,7 @@ import {
} from '../../generated/api'
import type {
AccountApi,
+ FeatureRequestAccountApi,
FeatureRequestApi,
FeatureRequestHistoryApi,
FeatureRequestProductAreaApi,
@@ -208,6 +209,7 @@ export interface featureRequestsLogicValues {
savingProductArea: boolean
savingRequestChanges: boolean
searchQuery: string
+ selectedAccount: FeatureRequestAccountApi | null
statusFilter: FeatureRequestStatusEnumApi[]
submitDisabledReason: string | undefined
submittingRequest: boolean
@@ -408,6 +410,9 @@ export interface featureRequestsLogicActions {
setSearchQuery: (searchQuery: string) => {
searchQuery: string
}
+ setSelectedAccount: (selectedAccount: FeatureRequestAccountApi | null) => {
+ selectedAccount: FeatureRequestAccountApi | null
+ }
setSubmittingRequest: (submittingRequest: boolean) => {
submittingRequest: boolean
}
@@ -442,7 +447,10 @@ export interface featureRequestsLogicMeta {
__keaTypeGenInternalSelectorTypes: {
currentTeamId: (currentTeam: TeamPublicType | TeamType | null) => string
activeProductAreas: (productAreas: FeatureRequestProductAreaApi[]) => FeatureRequestProductAreaApi[]
- accountOptions: (accounts: AccountApi[]) => {
+ accountOptions: (
+ accounts: AccountApi[],
+ selectedAccount: FeatureRequestAccountApi | null
+ ) => {
key: string
label: string
}[]
@@ -460,14 +468,12 @@ export interface featureRequestsLogicMeta {
}[]
submitDisabledReason: (
title: string,
- description: string,
accountId: string | null,
productAreaIds: string[],
submittingRequest: boolean
) => string | undefined
editDisabledReason: (
editTitle: string,
- editDescription: string,
editAccountId: string | null,
editProductAreaIds: string[],
savingRequestChanges: boolean
@@ -521,6 +527,7 @@ export const featureRequestsLogic = kea<featureRequestsLogicType>([
setTitle: (title: string) => ({ title }),
setDescription: (description: string) => ({ description }),
setAccountId: (accountId: string | null) => ({ accountId }),
+ setSelectedAccount: (selectedAccount: FeatureRequestAccountApi | null) => ({ selectedAccount }),
setAccountSearch: (accountSearch: string) => ({ accountSearch }),
setProductAreaIds: (productAreaIds: string[]) => ({ productAreaIds }),
setIdempotencyKey: (idempotencyKey: string) => ({ idempotencyKey }),
@@ -681,6 +688,15 @@ export const featureRequestsLogic = kea<featureRequestsLogicType>([
},
],
accountSearch: ['', { setAccountSearch: (_, { accountSearch }) => accountSearch }],
+ selectedAccount: [
+ null as FeatureRequestAccountApi | null,
+ {
+ setSelectedAccount: (_, { selectedAccount }) => selectedAccount,
+ openEditRequest: (_, { featureRequest }) => featureRequest.account,
+ closeCreateRequest: () => null,
+ closeEditRequest: () => null,
+ },
+ ],
accountsError: [
null as string | null,
{
@@ -861,9 +877,17 @@ export const featureRequestsLogic = kea<featureRequestsLogicType>([
productAreas.filter((area) => area.is_active),
],
accountOptions: [
- (selectors) => [selectors.accounts],
- (accounts: AccountApi[]): { key: string; label: string }[] =>
- accounts.map((account) => ({ key: account.id, label: account.name })),
+ (selectors) => [selectors.accounts, selectors.selectedAccount],
+ (
+ accounts: AccountApi[],
+ selectedAccount: FeatureRequestAccountApi | null
+ ): { key: string; label: string }[] => {
+ const displayAccounts =
+ selectedAccount && !accounts.some((account) => account.id === selectedAccount.id)
+ ? [selectedAccount, ...accounts]
+ : accounts
+ return displayAccounts.map((account) => ({ key: account.id, label: account.name }))
+ },
],
productAreaOptions: [
(selectors) => [selectors.activeProductAreas],
@@ -889,14 +913,12 @@ export const featureRequestsLogic = kea<featureRequestsLogicType>([
submitDisabledReason: [
(selectors) => [
selectors.title,
- selectors.description,
selectors.accountId,
selectors.productAreaIds,
selectors.submittingRequest,
],
(
title: string,
- description: string,
accountId: string | null,
productAreaIds: string[],
submittingRequest: boolean
@@ -907,9 +929,6 @@ export const featureRequestsLogic = kea<featureRequestsLogicType>([
if (!title.trim()) {
return 'Enter a title'
}
- if (!description.trim()) {
- return 'Enter a description'
- }
if (!accountId) {
return 'Select an account'
}
@@ -922,14 +941,12 @@ export const featureRequestsLogic = kea<featureRequestsLogicType>([
editDisabledReason: [
(selectors) => [
selectors.editTitle,
- selectors.editDescription,
selectors.editAccountId,
selectors.editProductAreaIds,
selectors.savingRequestChanges,
],
(
editTitle: string,
- editDescription: string,
editAccountId: string | null,
editProductAreaIds: string[],
savingRequestChanges: boolean
@@ -940,9 +957,6 @@ export const featureRequestsLogic = kea<featureRequestsLogicType>([
if (!editTitle.trim()) {
return 'Enter a title'
}
- if (!editDescription.trim()) {
- return 'Enter a description'
- }
if (!editAccountId) {
return 'Select an account'
}
@@ -1042,6 +1056,16 @@ export const featureRequestsLogic = kea<featureRequestsLogicType>([
actions.loadAccounts('')
actions.loadProductAreas()
},
+ setAccountId: ({ accountId }) => {
+ actions.setSelectedAccount(
+ accountId ? (values.accounts.find((account) => account.id === accountId) ?? null) : null
+ )
+ },
+ setEditAccountId: ({ editAccountId }) => {
+ actions.setSelectedAccount(
+ editAccountId ? (values.accounts.find((account) => account.id === editAccountId) ?? null) : null
+ )
+ },
setAccountSearch: async ({ accountSearch }, breakpoint) => {
await breakpoint(300)
actions.loadAccounts(accountSearch)
diff --git a/products/customer_analytics/frontend/generated/api.schemas.ts b/products/customer_analytics/frontend/generated/api.schemas.ts
index f09755263f28..d2009274fb8b 100644
--- a/products/customer_analytics/frontend/generated/api.schemas.ts
+++ b/products/customer_analytics/frontend/generated/api.schemas.ts
@@ -1639,8 +1639,8 @@ export interface FeatureRequestCreateApi {
* @maxLength 400
*/
title: string
- /** Required customer-facing request description in Markdown. */
- description: string
+ /** Optional customer-facing request description in Markdown. */
+ description?: string
/** ID of the affected Customer Analytics account. */
account_id: string
/** One or more active product area IDs. Duplicate IDs are ignored. */
@@ -1660,7 +1660,7 @@ export interface FeatureRequestUpdateApi {
* @maxLength 400
*/
title?: string
- /** Updated customer-facing request description in Markdown. */
+ /** Updated optional customer-facing request description in Markdown. */
description?: string
/** Updated affected Customer Analytics account ID. */
account_id?: string
@@ -1693,7 +1693,7 @@ export interface PatchedFeatureRequestUpdateApi {
* @maxLength 400
*/
title?: string
- /** Updated customer-facing request description in Markdown. */
+ /** Updated optional customer-facing request description in Markdown. */
description?: string
/** Updated affected Customer Analytics account ID. */
account_id?: string
diff --git a/products/customer_analytics/frontend/generated/api.zod.ts b/products/customer_analytics/frontend/generated/api.zod.ts
index e5131a8774e1..0596a3465d81 100644
--- a/products/customer_analytics/frontend/generated/api.zod.ts
+++ b/products/customer_analytics/frontend/generated/api.zod.ts
@@ -980,9 +980,14 @@ export const FeatureRequestProductAreasPartialUpdateBody = /* @__PURE__ */ zod.o
export const featureRequestsCreateBodyTitleMax = 400
+export const featureRequestsCreateBodyDescriptionDefault = ``
+
export const FeatureRequestsCreateBody = /* @__PURE__ */ zod.object({
title: zod.string().max(featureRequestsCreateBodyTitleMax).describe('Required customer-facing request title.'),
- description: zod.string().describe('Required customer-facing request description in Markdown.'),
+ description: zod
+ .string()
+ .default(featureRequestsCreateBodyDescriptionDefault)
+ .describe('Optional customer-facing request description in Markdown.'),
account_id: zod.uuid().describe('ID of the affected Customer Analytics account.'),
product_area_ids: zod.array(zod.uuid()).describe('One or more active product area IDs. Duplicate IDs are ignored.'),
idempotency_key: zod
@@ -1004,7 +1009,7 @@ export const FeatureRequestsUpdateBody = /* @__PURE__ */ zod.object({
.max(featureRequestsUpdateBodyTitleMax)
.optional()
.describe('Updated customer-facing request title.'),
- description: zod.string().optional().describe('Updated customer-facing request description in Markdown.'),
+ description: zod.string().optional().describe('Updated optional customer-facing request description in Markdown.'),
account_id: zod.uuid().optional().describe('Updated affected Customer Analytics account ID.'),
product_area_ids: zod
.array(zod.uuid())
@@ -1043,7 +1048,7 @@ export const FeatureRequestsPartialUpdateBody = /* @__PURE__ */ zod.object({
.max(featureRequestsPartialUpdateBodyTitleMax)
.optional()
.describe('Updated customer-facing request title.'),
- description: zod.string().optional().describe('Updated customer-facing request description in Markdown.'),
+ description: zod.string().optional().describe('Updated optional customer-facing request description in Markdown.'),
account_id: zod.uuid().optional().describe('Updated affected Customer Analytics account ID.'),
product_area_ids: zod
.array(zod.uuid())
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 431153facaac..84f6cd7851c2 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -36638,8 +36638,8 @@ export namespace Schemas {
* @maxLength 400
*/
title: string;
- /** Required customer-facing request description in Markdown. */
- description: string;
+ /** Optional customer-facing request description in Markdown. */
+ description?: string;
/** ID of the affected Customer Analytics account. */
account_id: string;
/** One or more active product area IDs. Duplicate IDs are ignored. */
@@ -36775,7 +36775,7 @@ export namespace Schemas {
* @maxLength 400
*/
title?: string;
- /** Updated customer-facing request description in Markdown. */
+ /** Updated optional customer-facing request description in Markdown. */
description?: string;
/** Updated affected Customer Analytics account ID. */
account_id?: string;
@@ -57561,7 +57561,7 @@ export namespace Schemas {
* @maxLength 400
*/
title?: string;
- /** Updated customer-facing request description in Markdown. */
+ /** Updated optional customer-facing request description in Markdown. */
description?: string;
/** Updated affected Customer Analytics account ID. */
account_id?: string;