Skip to content

API / Feedback improvements - #9451

Open
fxprunayre wants to merge 3 commits into
mainfrom
44-api-feedback
Open

API / Feedback improvements#9451
fxprunayre wants to merge 3 commits into
mainfrom
44-api-feedback

Conversation

@fxprunayre

Copy link
Copy Markdown
Member

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 ratingCount property 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)

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

Funded by Ifremer

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)
@fxprunayre fxprunayre added this to the 4.4.13 milestone Jul 29, 2026
@@ -211,18 +211,14 @@ public RatingAverage getMetadataRating(

// Check permission for metadata
final AbstractMetadata metadata = ApiUtils.canViewRecord(metadataUuid, request);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the suggestion to remove the variable

fxprunayre and others added 2 commits August 7, 2026 11:32
Co-authored-by: Jose García <josegar74@gmail.com>
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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.

2 participants