Repository navigation
CSCEXAM-1716 Fixed library filter dropdowns - #1483
Merged
Merged
Conversation
The question library filter dropdowns showed wrong or empty options: - GET /app/sections filtered ExamSection by paths that do not exist on it, so Ebean emitted them as raw SQL: examSectionQuestions.question. tags.id -> PostgreSQL "cross-database references are not implemented" (seen in production logs), questionOwners.id -> "missing FROM-clause entry for table". The request returned 500 and the section dropdown silently stayed empty/stale. Both filters now go through sectionQuestions.question. - listTags$ passed section ids as examIds and exam ids as sectionIds (argument order left behind in CSCEXAM-1210), so the tag dropdown was filtered by the wrong ids. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
LofhJann
self-requested a review
October 26, 2026 10:30
LofhJann
approved these changes
Oct 26, 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.
https://jira.eduuni.fi/browse/CSCEXAM-1716
Problem
The question library's filter dropdowns showed wrong or empty options, with no visible error.
Exam section dropdown (
GET /app/sections): when a tag or question owner filter was already selected, the endpoint filteredExamSectionby paths that don't exist on it,examSectionQuestions.question.tags.idandquestionOwners.id. Ebean emits unknown paths as raw SQL, so PostgreSQL failed withcross-database references are not implemented: examsectionquestions.question.tags.id(seen in production logs) ormissing FROM-clause entry for table "questionowners". The 500 was swallowed by the frontend (no error handler on the subscribe), so the dropdown stayed empty or stale.Repro: select a tag, then open the Exam section dropdown.
Tag dropdown (
listTags$): section IDs were sent asexamIdsand exam IDs assectionIds. The argument order was left behind when CSCEXAM-1210 reorderedgetQueryParams(2023). With an exam or section selected, the tag list was filtered by the wrong IDs.Fix
sectionQuestions.question(distinctalready handles duplicate rows from the to-many joins).listTags$passes its IDs in the right order.Tests
New controller tests for section filtering by tag, by owner, and by both. All three fail without the fix and pass with it. There are no frontend specs for
LibraryService; thelistTags$change is a one-line argument reorder.🤖 Generated with Claude Code