Skip to content

fix(edit-content): join category inodes for API submission#35249

Merged
oidacra merged 2 commits intomainfrom
issue-33931-categories-not-saved
Apr 8, 2026
Merged

fix(edit-content): join category inodes for API submission#35249
oidacra merged 2 commits intomainfrom
issue-33931-categories-not-saved

Conversation

@oidacra
Copy link
Copy Markdown
Member

@oidacra oidacra commented Apr 7, 2026

Summary

  • Add category-specific handling in processFieldValue() to join the array of category inodes into a comma-separated string before sending to the API
  • The category component sends string[] of inodes via onChange(), but the backend expects a comma-separated string

Closes #33931

Acceptance Criteria

  • Categories selected in new edit content mode are saved correctly
  • Categories display correctly after saving and reopening
  • No regression on other field types

Test Plan

  • yarn nx test edit-content --testPathPattern=functions.util — all tests pass
  • Manual: Create content with categories, save, verify categories persist

Changed Files

File Change
libs/edit-content/src/lib/utils/functions.util.ts:615-618 Added CATEGORY handler in processFieldValue()

This PR fixes: #33931

…or API

processFieldValue() was passing category arrays as-is to the API.
The backend expects a comma-separated string of inodes.

Closes #33931
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Apr 7, 2026

Claude finished @oidacra's task in 2m 47s —— View job


Claude finished @oidacra's task in 2m 52s —— View job


I'll analyze this and get back to you.

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Apr 7, 2026

Rollback Safety Analysis

  • Read rollback-unsafe categories reference
  • Get full PR diff
  • Analyze diff against all unsafe categories
  • Apply appropriate label

Result: Safe To Rollback -- label applied.

The diff contains only two frontend TypeScript files. All 14 rollback-unsafe categories (C-1 through M-4) were checked; none apply. No DB migrations, no ES mapping changes, no API contract changes, no data model changes. Rolling back simply reintroduces the original category-not-saving bug with no broader impact.

View job run

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses category fields not persisting in the New Edit Content experience by normalizing the category form value into the backend-expected submission format (comma-separated string) before calling the save/workflow API.

Changes:

  • Added CATEGORY-specific handling in processFieldValue() to serialize string[] category inode arrays as a comma-separated string for API submission.

Comment thread core-web/libs/edit-content/src/lib/utils/functions.util.ts
Comment thread core-web/libs/edit-content/src/lib/utils/functions.util.ts
@oidacra oidacra marked this pull request as ready for review April 8, 2026 14:58
@oidacra oidacra enabled auto-merge April 8, 2026 14:58
@oidacra oidacra self-assigned this Apr 8, 2026
@oidacra oidacra added this pull request to the merge queue Apr 8, 2026
Merged via the queue into main with commit 1e5c35e Apr 8, 2026
28 checks passed
@oidacra oidacra deleted the issue-33931-categories-not-saved branch April 8, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Safe To Rollback Area : Frontend PR changes Angular/TypeScript frontend code

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[DEFECT] Categories not saved or displayed when using New Edit Contentlet Mode

3 participants