Skip to content
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

Create API/Factory methods to insert in the unique_fields table #30277

Closed
Tracked by #29459
freddyDOTCMS opened this issue Oct 7, 2024 · 4 comments · Fixed by #30466
Closed
Tracked by #29459

Create API/Factory methods to insert in the unique_fields table #30277

freddyDOTCMS opened this issue Oct 7, 2024 · 4 comments · Fixed by #30466

Comments

@freddyDOTCMS
Copy link
Contributor

Parent Issue

#29459

User Story

We need to create API and Factory methods to insert a record into the new unique_factory table:

  • Factory Method:

This method should take the unique_key and the JSON for the supporting_values, this JSON can be pass like a Map. It will insert a new record. If an exception occurs due to a unique primary key (PK) violation, the method should allow the exception to propagate without handling it.

API Method:

This method should accept all the unqiue Criteria: Content Type ID, FIeld variable name, Host id, language Id, Field value, and content identifier. It must also check the value of the uniquePerSite field to determine how to calculate the hash. If uniquePerSite is true, the host_id must be included in the hash calculation. If a unique PK violation occurs, it should wrap the error in a custom exception.

AFter calculate the unique field key it must use the Factory method to save the new unique register.

Acceptance Criteria

API/Factory methods implemented

Proposed Objective

Core Features

Proposed Priority

Priority 2 - Important

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

No response

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

Copy link

@freddyDOTCMS
Copy link
Contributor Author

Note to QA: test together with #30279

@freddyDOTCMS freddyDOTCMS removed their assignment Oct 30, 2024
@jcastro-dotcms jcastro-dotcms self-assigned this Nov 1, 2024
@jcastro-dotcms
Copy link
Contributor

As @freddyDOTCMS pointed out, this fix is not verifiable per se. It is validated after testing this related ticket:

Such a ticket passed IQA, which means this one did as well.

@jcastro-dotcms jcastro-dotcms moved this from Internal QA to QA - Backlog in dotCMS - Product Planning Nov 1, 2024
@jcastro-dotcms jcastro-dotcms removed their assignment Nov 1, 2024
@josemejias11
Copy link
Contributor

Approved: Tested on trunk_7a2d6bc, Docker, macOS 14.5, FF v126.0.1

@josemejias11 josemejias11 moved this from QA - In Progress to Done in dotCMS - Product Planning Nov 5, 2024
@dsilvam dsilvam closed this as completed Nov 13, 2024
@github-project-automation github-project-automation bot moved this from Done to Internal QA in dotCMS - Product Planning Nov 13, 2024
@dsilvam dsilvam moved this from Internal QA to Done in dotCMS - Product Planning Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants