Skip to content

Fix UUID Generation Error for Collection Records #6351

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
merged 1 commit into from
Mar 7, 2024

Conversation

sanjacornelius
Copy link
Contributor

@sanjacornelius sanjacornelius commented Mar 6, 2024

This PR addresses a log error related to UUID generation when creating collection records. The error occurred due to the duplication of generateUuid method in the HasUuid file and in the collections package RecordObserver file. While this error did not affect functionality, it cluttered the logs unnecessarily.

Solution

  • Modified conditional for the generateUuid method in the HasUuid trait to prevent UUID generation for collection records.
  • Improved the original query to validate if the uuid property is set on the object before attempting to generate a UUID.

How to Test

  1. Ensure a collection is created.
  2. Clear the logs.
  3. Create a collection record.
  4. Verify that no errors related to UUID generation are logged.
  5. Ensure the creation process of collection records functions as expected.

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

The collection package already handles generating the collection record uuid upon creation.
Copy link

@ryancooley ryancooley merged commit 61225e1 into develop Mar 7, 2024
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.

3 participants