Skip to content

Conversation

@gortiz-dotcms
Copy link
Contributor

@gortiz-dotcms gortiz-dotcms commented Apr 24, 2025

If we delete a field and want to create another one with the same var name we should wait until the CleanUpFieldReferencesJob ends.

So to achieve this, a new validation method validateFieldReferences was added to the save field method, this validation function checks if there is a CleanUpFieldReferencesJob running with a field with the same name, if it finds one, then it throws an exception the user will see.

Also, System Messages were added to notify when the job starts and finishes running.

messages_fix.mov

This PR fixes: #31869

@dotcms-github-app
Copy link

Please use a Conventional Commit title format for this PR. For more information, see https://www.conventionalcommits.org/en/v1.0.0/

@gortiz-dotcms gortiz-dotcms marked this pull request as ready for review April 25, 2025 12:20
@erickgonzalez erickgonzalez enabled auto-merge April 29, 2025 21:25
@erickgonzalez erickgonzalez added this pull request to the merge queue Apr 29, 2025
Merged via the queue into main with commit b01ccb0 Apr 29, 2025
37 checks passed
@erickgonzalez erickgonzalez deleted the issue-31869-clean-up-job-field-reference-issue branch April 29, 2025 23:14
spbolton pushed a commit that referenced this pull request Jun 20, 2025
…ng field (#31983)

If we delete a field and want to create another one with the same var
name we should wait until the CleanUpFieldReferencesJob ends.

So to achieve this, a new validation method `validateFieldReferences`
was added to the save field method, this validation function checks if
there is a CleanUpFieldReferencesJob running with a field with the same
name, if it finds one, then it throws an exception the user will see.

Also, System Messages were added to notify when the job starts and
finishes running.



https://github.com/user-attachments/assets/0379c3b0-145a-45cd-bd00-ed01ebf32a08

---------

Co-authored-by: erickgonzalez <erick.gonzalez@dotcms.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CleanUpFieldReferencesJob does not notify upon completion

5 participants