Skip to content

CleanUpFieldReferencesJob does not notify upon completion #31869

@erickgonzalez

Description

@erickgonzalez

Problem Statement

The CleanUpFieldReferencesJob currently runs silently in the background without notifying users or logging a clear completion status. As a result, if a user attempts to recreate a previously deleted field before the job has finished, this can lead to contentlets with data corruption or unexpected behavior in the system.

Steps to Reproduce

  1. Create a field e.g Text Field named creationDate
  2. Create 5000 contentlets of this content type. Here, I attach a bash script that might help you; just need to change it accordingly.

create1000contents.txt

  1. Delete the field.
  2. Before the job completes, recreate the same field (same variable name) e.g DateTime Field named creationDate.
  3. Attempt to edit existing contentlets that previously referenced the deleted field. Get an error in the UI.

Image

  1. Observe that the data is corrupted. Check the DB, the type for the field shows Text.Image

Acceptance Criteria

  • After the user clicks over the delete option, a message will show that the job is being triggered.
  • The CleanUpFieldReferencesJob must log a clear “completed” message in system logs once it finishes processing.
  • Prevent users from recreating a deleted field (with the same variable name) until the cleanup job has fully completed.

dotCMS Version

25.03.27-1, but all LTS apply.

Proposed Objective

Customer Support

Proposed Priority

Priority 3 - Average

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

https://dotcms.freshdesk.com/a/tickets/30512

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions