Rename PublishAuditStatus.Status.FAILED_TO_SENT → FAILED_TO_SEND (BE + FE + data migration)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Description
com.dotcms.publisher.business.PublishAuditStatus.Status declares a value spelled FAILED_TO_SENT (past tense of send would be sent, but the base verb here should be send, matching every other status in the enum — FAILED_TO_BUNDLE, FAILED_TO_PUBLISH).
Code location: dotCMS/src/main/java/com/dotcms/publisher/business/PublishAuditStatus.java:31
FAILED_TO_SENT(7),
The FE mirror at core-web/libs/dotcms-models/src/lib/publishing-status.model.ts:10 follows Java verbatim to keep JSON serialization matching:
FAILED_TO_SENT = 'FAILED_TO_SENT',
Why this is not a one-line fix:
- BE serializes the enum via
Status.name(), so JSON payloads on/api/v1/publishingcarry the literal string"FAILED_TO_SENT". Any FE-side rename without a coordinated BE change breaks status filtering + chip rendering. - The
publish_audit.statuscolumn stores rows with the string"FAILED_TO_SENT"produced by the enum name — renaming the enum value invalidates existing rows. A DB migration (or a compatibility read path) is required. - External API consumers may filter by
status=FAILED_TO_SENTin their integrations — renaming is a public API contract break.
Acceptance Criteria
To be refined. (Quick draft — details to be added after team confirms scope.)
- Decide on approach: full rename (BE enum + FE enum + DB migration + release note as a breaking API change) OR keep as-is and treat as legacy nomenclature
- If renaming: coordinate BE + FE + migration in a single release; add a compatibility alias so the old string still parses on read for one release cycle
- Update Postman coverage + release notes
Priority
Low — cosmetic; the code works correctly today, just reads oddly.
Additional Context
Surfaced by the agentic PR reviewer on #36413. Rebutted on that PR because the FE mirrors the BE — fixing it there would break serialization matching.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with dotCMS/src/main/java/com/dotcms/publisher/business/PublishAuditStatus.java and core-web/libs/dotcms-models/src/lib/publishing-status.model.ts, then inspect the publish_audit status storage and /api/v1/publishing behavior. First confirm the team’s approach and compatibility requirements; done means the coordinated BE, FE, database, Postman, and release-note changes are defined and covered for the selected approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript
- Domain
- api, backend, database, frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100