Resolves issue #1663, Resolve inconsistent parameters and query target UUID when fetching review history conversations.#1815
Merged
Merged
Conversation
cberger8
approved these changes
May 20, 2026
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
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.
Closes Issue #1663
Summary
Resolves a bug where fetching the review history for an organization with conversations included (
include_conversations=true) fails. The codebase had inconsistent parameters ingetAllByTargetUUIDinsidereviewObjectRepository.jsand was querying using the review object UUID instead of the organization's target UUID. Additionally, the conversation repository has been hardened to prevent paginator options (likelean: true) from leaking into thefind()query, which previously caused aTypeErrorand hung the request.Important Changes
src/repositories/reviewObjectRepository.jsgetReviewHistoryByOrgShortNamePaginatedto retrieve conversations usingreview.target_object_uuidinstead ofreview.uuid.optionsintogetAllByTargetUUIDto prevent pollution of conversation queries.src/repositories/conversationRepository.jsgetAllByTargetUUIDto filter incoming query options, extracting only Mongoose transactionsessionand ignoring pagination options likeleanorpagethat disrupt.toObject()serialization.test/integration-tests/review-object/reviewObjectTest.js"Retrieves review history with conversations included"integration test to post a public conversation to the test organization, fetch the history withinclude_conversations=true, and assert the comment body matches correctly.Testing
Steps to manually test updated functionality, if possible
bash -i -c "npm run test:integration"."Retrieves review history with conversations included"under "Review Object Controller Integration Tests" passes.Notes