API / Feedback improvements - #9451
Open
fxprunayre wants to merge 3 commits into
Open
Conversation
Feedback with child not removed. The record reviews may have a parentUuid set but the API was failing with "could not execute batch; SQL [delete from GUF_UserFeedbacks where uuid=?];". When removing a feedback, remove all children too. Average was computed with rating > 0, but ratingCount was considering null or 0 rating. Do not count rating if null or 0. The API return 2 infos: * ratingCount - number of rating > 0 * userfeedbackCount - number of reviews (with rating or not)
josegar74
reviewed
Aug 7, 2026
| @@ -211,18 +211,14 @@ public RatingAverage getMetadataRating( | |||
|
|
|||
| // Check permission for metadata | |||
| final AbstractMetadata metadata = ApiUtils.canViewRecord(metadataUuid, request); | |||
Member
There was a problem hiding this comment.
Check the suggestion to remove the variable
Co-authored-by: Jose García <josegar74@gmail.com>
|
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.


Removing feedback with child return an error. The record reviews may have a parentUuid set but the API was failing with "could not execute batch; SQL [delete from GUF_UserFeedbacks where uuid=?];". When removing a feedback, remove all children too.
Average was computed with rating > 0, but
ratingCountproperty was considering null or 0 rating. Do not count rating if null or 0. The API return 2 infos:ratingCount- number of rating > 0userfeedbackCount- number of reviews (with rating or not)Checklist
mainbranch, backports managed with labelREADME.mdfilespom.xmldependency management. Update build documentation with intended library use and library tutorials or documentationFunded by Ifremer