-
Notifications
You must be signed in to change notification settings - Fork 480
fix(Field API): add validation on CleanUpFieldReferencesJob when saving field #31983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
erickgonzalez
merged 7 commits into
main
from
issue-31869-clean-up-job-field-reference-issue
Apr 29, 2025
Merged
fix(Field API): add validation on CleanUpFieldReferencesJob when saving field #31983
erickgonzalez
merged 7 commits into
main
from
issue-31869-clean-up-job-field-reference-issue
Apr 29, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Please use a Conventional Commit title format for this PR. For more information, see https://www.conventionalcommits.org/en/v1.0.0/ |
jdotcms
reviewed
Apr 29, 2025
dotCMS/src/main/java/com/dotcms/contenttype/business/FieldAPIImpl.java
Outdated
Show resolved
Hide resolved
jdotcms
approved these changes
Apr 29, 2025
erickgonzalez
approved these changes
Apr 29, 2025
dsolistorres
approved these changes
Apr 29, 2025
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
validateFieldReferenceswas 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