Repository navigation
fix: public comment by id 500, comment staff fields, small API fixes - #949
Merged
Merged
Conversation
The by-id route declares no count parameter, so reading count.value threw. Return an array, empty when no public comment matches. Hide the author unless isAnonymous is false, and keep staff review fields off the public routes.
- Pass the signed-in flag from search into createMatchAggr instead of working it out again from roles. - Publish on a locked project returns 409 for a non-numeric year, same as PUT. - Remove unused projectDAO.publishProject, which set the Act with no lock or content check. - Swagger: note that a locked project gets 409 before 404, and add the Error schema to the publish 404. - Correct the deploy-to-prod comment: it does not check that the version ran on test. - Test a PUT that moves a project to 2025.
danieltruong
requested review from
Ckoelewyn,
tolkamps1 and
tom0827
as code owners
October 14, 2026 00:28
Public item search on a comment returned eaoNotes, eaoStatus, proponentNotes, rejectedNotes and rejectedReason, because the item pipeline has no field projection. Drop them for callers who are not signed in, using one shared list with the public comment routes. Also test that search passes the signed-in flag to the document match.
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.
Three commits.
GET /api/public/comment/:idreturned 500. The by-id route has nocountparameter, and the handler readcount.value. The route now returns an array: the one comment, or[]when no public comment has that id. The author is hidden unlessisAnonymousisfalse, here and in the comment search. Public routes no longer accept staff review fields infields(newPublicCommentFieldsenum in swagger).Small fixes from the repo TODO list:
createMatchAggrinstead of working it out again from roles.projectDAO.publishProject, which set the Act with no lock or content check.Public item search on a comment (
/public/search?dataset=Item&_schemaName=Comment) returned the staff fieldseaoNotes,eaoStatus,proponentNotes,rejectedNotesandrejectedReason. They are now dropped for callers who are not signed in, using one shared list with the public comment routes. Also adds a test that search passes the signed-in flag to the document match.