Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/api/plane/api/serializers/intake.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Meta:
model = Issue
fields = [
"name",
"description",
"description_json",
"description_html",
"priority",
]
Expand Down
2 changes: 1 addition & 1 deletion apps/api/plane/api/serializers/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class IssueSerializer(BaseSerializer):
class Meta:
model = Issue
read_only_fields = ["id", "workspace", "project", "updated_by", "updated_at"]
exclude = ["description", "description_stripped"]
exclude = ["description_json", "description_stripped"]

def validate(self, data):
if (
Expand Down
4 changes: 2 additions & 2 deletions apps/api/plane/api/views/intake.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def post(self, request, slug, project_id):
# create an issue
issue = Issue.objects.create(
name=request.data.get("issue", {}).get("name"),
description=request.data.get("issue", {}).get("description", {}),
description_json=request.data.get("issue", {}).get("description_json", {}),
description_html=request.data.get("issue", {}).get("description_html", "<p></p>"),
priority=request.data.get("issue", {}).get("priority", "none"),
project_id=project_id,
Expand Down Expand Up @@ -368,7 +368,7 @@ def patch(self, request, slug, project_id, issue_id):
issue_data = {
"name": issue_data.get("name", issue.name),
"description_html": issue_data.get("description_html", issue.description_html),
"description": issue_data.get("description", issue.description),
"description_json": issue_data.get("description_json", issue.description_json),
}

issue_serializer = IssueSerializer(issue, data=issue_data, partial=True)
Expand Down
2 changes: 1 addition & 1 deletion apps/api/plane/app/serializers/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Meta:
fields = [
"id",
"name",
"description",
"description_json",
"description_html",
"priority",
"start_date",
Expand Down
10 changes: 5 additions & 5 deletions apps/api/plane/app/serializers/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def create(self, validated_data):
labels = validated_data.pop("labels", None)
project_id = self.context["project_id"]
owned_by_id = self.context["owned_by_id"]
description = self.context["description"]
description_json = self.context["description_json"]
description_binary = self.context["description_binary"]
description_html = self.context["description_html"]

Expand All @@ -68,7 +68,7 @@ def create(self, validated_data):
# Create the page
page = Page.objects.create(
**validated_data,
description=description,
description_json=description_json,
description_binary=description_binary,
description_html=description_html,
owned_by_id=owned_by_id,
Expand Down Expand Up @@ -171,7 +171,7 @@ class PageBinaryUpdateSerializer(serializers.Serializer):

description_binary = serializers.CharField(required=False, allow_blank=True)
description_html = serializers.CharField(required=False, allow_blank=True)
description = serializers.JSONField(required=False, allow_null=True)
description_json = serializers.JSONField(required=False, allow_null=True)

def validate_description_binary(self, value):
"""Validate the base64-encoded binary data"""
Expand Down Expand Up @@ -214,8 +214,8 @@ def update(self, instance, validated_data):
if "description_html" in validated_data:
instance.description_html = validated_data.get("description_html")

if "description" in validated_data:
instance.description = validated_data.get("description")
if "description_json" in validated_data:
instance.description_json = validated_data.get("description_json")

instance.save()
return instance
2 changes: 1 addition & 1 deletion apps/api/plane/app/views/intake/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def partial_update(self, request, slug, project_id, pk):
issue_data = {
"name": issue_data.get("name", issue.name),
"description_html": issue_data.get("description_html", issue.description_html),
"description": issue_data.get("description", issue.description),
"description_json": issue_data.get("description_json", issue.description_json),
}

issue_current_instance = json.dumps(IssueDetailSerializer(issue).data, cls=DjangoJSONEncoder)
Expand Down
2 changes: 1 addition & 1 deletion apps/api/plane/app/views/page/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def create(self, request, slug, project_id):
context={
"project_id": project_id,
"owned_by_id": request.user.id,
"description": request.data.get("description", {}),
"description_json": request.data.get("description_json", {}),
"description_binary": request.data.get("description_binary", None),
"description_html": request.data.get("description_html", "<p></p>"),
},
Expand Down
2 changes: 1 addition & 1 deletion apps/api/plane/bgtasks/copy_s3_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def copy_s3_objects_of_description_and_assets(entity_name, entity_identifier, pr
external_data = sync_with_external_service(entity_name, updated_html)

if external_data:
entity.description = external_data.get("description")
entity.description_json = external_data.get("description_json")
entity.description_binary = base64.b64decode(external_data.get("description_binary"))
entity.save()

Expand Down
4 changes: 2 additions & 2 deletions apps/api/plane/bgtasks/issue_description_version_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def sync_issue_description_version(batch_size=5000, offset=0, countdown=300):
"description_binary",
"description_html",
"description_stripped",
"description",
"description_json",
)[offset:end_offset]
)

Expand Down Expand Up @@ -92,7 +92,7 @@ def sync_issue_description_version(batch_size=5000, offset=0, countdown=300):
description_binary=issue.description_binary,
description_html=issue.description_html,
description_stripped=issue.description_stripped,
description_json=issue.description,
description_json=issue.description_json,
)
)

Expand Down
2 changes: 1 addition & 1 deletion apps/api/plane/bgtasks/issue_description_version_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def should_update_existing_version(


def update_existing_version(version: IssueDescriptionVersion, issue) -> None:
version.description_json = issue.description
version.description_json = issue.description_json
version.description_html = issue.description_html
version.description_binary = issue.description_binary
version.description_stripped = issue.description_stripped
Expand Down
2 changes: 1 addition & 1 deletion apps/api/plane/bgtasks/page_version_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def page_version(page_id, existing_instance, user_id):
description_binary=page.description_binary,
owned_by_id=user_id,
last_saved_at=page.updated_at,
description_json=page.description,
description_json=page.description_json,
description_stripped=page.description_stripped,
)

Expand Down
2 changes: 1 addition & 1 deletion apps/api/plane/bgtasks/workspace_seed_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def create_pages(workspace: Workspace, project_map: Dict[int, uuid.UUID], bot_us
is_global=False,
access=page_seed.get("access", Page.PUBLIC_ACCESS),
name=page_seed.get("name"),
description=page_seed.get("description", {}),
description_json=page_seed.get("description_json", {}),
description_html=page_seed.get("description_html", "<p></p>"),
description_binary=page_seed.get("description_binary", None),
description_stripped=page_seed.get("description_stripped", None),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 4.2.22 on 2026-01-03 11:53

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('db', '0113_webhook_version'),
]

operations = [
migrations.RenameField(
model_name='draftissue',
old_name='description',
new_name='description_json',
),
migrations.RenameField(
model_name='issue',
old_name='description',
new_name='description_json',
),
migrations.RenameField(
model_name='page',
old_name='description',
new_name='description_json',
),
]
2 changes: 1 addition & 1 deletion apps/api/plane/db/models/draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class DraftIssue(WorkspaceBaseModel):
blank=True,
)
name = models.CharField(max_length=255, verbose_name="Issue Name", blank=True, null=True)
description = models.JSONField(blank=True, default=dict)
description_json = models.JSONField(blank=True, default=dict)
description_html = models.TextField(blank=True, default="<p></p>")
description_stripped = models.TextField(blank=True, null=True)
description_binary = models.BinaryField(null=True)
Expand Down
4 changes: 2 additions & 2 deletions apps/api/plane/db/models/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class Issue(ProjectBaseModel):
blank=True,
)
name = models.CharField(max_length=255, verbose_name="Issue Name")
description = models.JSONField(blank=True, default=dict)
description_json = models.JSONField(blank=True, default=dict)
description_html = models.TextField(blank=True, default="<p></p>")
description_stripped = models.TextField(blank=True, null=True)
description_binary = models.BinaryField(null=True)
Expand Down Expand Up @@ -830,7 +830,7 @@ def log_issue_description_version(cls, issue, user):
description_binary=issue.description_binary,
description_html=issue.description_html,
description_stripped=issue.description_stripped,
description_json=issue.description,
description_json=issue.description_json,
)
return True
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion apps/api/plane/db/models/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Page(BaseModel):

workspace = models.ForeignKey("db.Workspace", on_delete=models.CASCADE, related_name="pages")
name = models.TextField(blank=True)
description = models.JSONField(default=dict, blank=True)
description_json = models.JSONField(default=dict, blank=True)
description_binary = models.BinaryField(null=True)
description_html = models.TextField(blank=True, default="<p></p>")
description_stripped = models.TextField(blank=True, null=True)
Expand Down
2 changes: 1 addition & 1 deletion apps/api/plane/space/serializer/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class Meta:
fields = [
"id",
"name",
"description",
"description_json",
"description_html",
"priority",
"start_date",
Expand Down
4 changes: 2 additions & 2 deletions apps/api/plane/space/views/intake.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def create(self, request, anchor, intake_id):
# create an issue
issue = Issue.objects.create(
name=request.data.get("issue", {}).get("name"),
description=request.data.get("issue", {}).get("description", {}),
description_json=request.data.get("issue", {}).get("description_json", {}),
description_html=request.data.get("issue", {}).get("description_html", "<p></p>"),
priority=request.data.get("issue", {}).get("priority", "low"),
project_id=project_deploy_board.project_id,
Expand Down Expand Up @@ -201,7 +201,7 @@ def partial_update(self, request, anchor, intake_id, pk):
issue_data = {
"name": issue_data.get("name", issue.name),
"description_html": issue_data.get("description_html", issue.description_html),
"description": issue_data.get("description", issue.description),
"description_json": issue_data.get("description_json", issue.description_json),
}

issue_serializer = IssueCreateSerializer(
Expand Down
2 changes: 1 addition & 1 deletion apps/api/plane/space/views/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ def get(self, request, anchor, issue_id):
"name",
"state_id",
"sort_order",
"description",
"description_json",
"description_html",
"description_stripped",
"description_binary",
Expand Down
4 changes: 2 additions & 2 deletions apps/live/src/controllers/document.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ export class DocumentController {
const { description_html, variant } = validatedData;

// Process document conversion
const { description, description_binary } = convertHTMLDocumentToAllFormats({
const { description_json, description_binary } = convertHTMLDocumentToAllFormats({
document_html: description_html,
variant,
});

// Return successful response
res.status(200).json({
description,
description_json,
description_binary,
});
} catch (error) {
Expand Down
13 changes: 7 additions & 6 deletions apps/live/src/extensions/database.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Database as HocuspocusDatabase } from "@hocuspocus/extension-database";
// utils
// plane imports
import {
getAllDocumentFormatsFromDocumentEditorBinaryData,
getBinaryDataFromDocumentEditorHTMLString,
} from "@plane/editor";
// logger
import type { TDocumentPayload } from "@plane/types";
import { logger } from "@plane/logger";
// lib
import { AppError } from "@/lib/errors";
// services
import { getPageService } from "@/services/page/handler";
Expand Down Expand Up @@ -36,10 +37,10 @@ const fetchDocument = async ({ context, documentName: pageId, instance }: FetchP
convertedBinaryData,
true
);
const payload = {
const payload: TDocumentPayload = {
description_binary: contentBinaryEncoded,
description_html: contentHTML,
description: contentJSON,
description_json: contentJSON,
};
await service.updateDescriptionBinary(pageId, payload);
} catch (e) {
Expand Down Expand Up @@ -76,10 +77,10 @@ const storeDocument = async ({
true
);
// create payload
const payload = {
const payload: TDocumentPayload = {
description_binary: contentBinaryEncoded,
description_html: contentHTML,
description: contentJSON,
description_json: contentJSON,
};
await service.updateDescriptionBinary(pageId, payload);
} catch (error) {
Expand Down
10 changes: 2 additions & 8 deletions apps/live/src/services/page/core.service.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import { logger } from "@plane/logger";
import type { TPage } from "@plane/types";
import type { TDocumentPayload, TPage } from "@plane/types";
// services
import { AppError } from "@/lib/errors";
import { APIService } from "../api.service";

export type TPageDescriptionPayload = {
description_binary: string;
description_html: string;
description: object;
};

export abstract class PageCoreService extends APIService {
protected abstract basePath: string;

Expand Down Expand Up @@ -103,7 +97,7 @@ export abstract class PageCoreService extends APIService {
}
}

async updateDescriptionBinary(pageId: string, data: TPageDescriptionPayload): Promise<any> {
async updateDescriptionBinary(pageId: string, data: TDocumentPayload): Promise<any> {
return this.patch(`${this.basePath}/pages/${pageId}/description/`, data, {
headers: this.getHeader(),
})
Expand Down
2 changes: 1 addition & 1 deletion apps/web/core/hooks/use-page-fallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const usePageFallback = (args: TArgs) => {
await updatePageDescription({
description_binary: encodedBinary,
description_html: html,
description: json,
description_json: json,
});
} catch (error: any) {
console.error(error);
Expand Down
8 changes: 4 additions & 4 deletions apps/web/core/store/pages/base-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class BasePage extends ExtendedBasePage implements TBasePage {
id: string | undefined;
name: string | undefined;
logo_props: TLogoProps | undefined;
description: object | undefined;
description_json: object | undefined;
description_html: string | undefined;
color: string | undefined;
label_ids: string[] | undefined;
Expand Down Expand Up @@ -117,7 +117,7 @@ export class BasePage extends ExtendedBasePage implements TBasePage {
this.id = page?.id || undefined;
this.name = page?.name;
this.logo_props = page?.logo_props || undefined;
this.description = page?.description || undefined;
this.description_json = page?.description_json || undefined;
this.description_html = page?.description_html || undefined;
this.color = page?.color || undefined;
this.label_ids = page?.label_ids || undefined;
Expand All @@ -142,7 +142,7 @@ export class BasePage extends ExtendedBasePage implements TBasePage {
id: observable.ref,
name: observable.ref,
logo_props: observable.ref,
description: observable,
description_json: observable.ref,
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The observable decorator for description_json has been changed from observable to observable.ref. This change affects how MobX tracks changes to this field. With observable.ref, only reassignments of the entire object will trigger reactions, but changes to properties within the object will not be tracked. If the description_json object is mutated in place elsewhere in the codebase, those changes will no longer trigger UI updates. Consider whether this change is intentional - if the description_json object is never mutated in place and is only ever replaced entirely, observable.ref is appropriate. Otherwise, you should keep it as observable to maintain deep reactivity.

Suggested change
description_json: observable.ref,
description_json: observable,

Copilot uses AI. Check for mistakes.
description_html: observable.ref,
color: observable.ref,
label_ids: observable,
Expand Down Expand Up @@ -217,7 +217,7 @@ export class BasePage extends ExtendedBasePage implements TBasePage {
return {
id: this.id,
name: this.name,
description: this.description,
description_json: this.description_json,
description_html: this.description_html,
color: this.color,
label_ids: this.label_ids,
Expand Down
Loading
Loading