Assessment queue filters and report status - #146
Merged
Conversation
The queue listed every active assessment with no way to narrow it down. Adds a filter bar above the table with a status dropdown, from/to date inputs and a quick-range picker (today, next 7/30 days, this week/month, last month, this year, all time). Filtering is client side through a DataTables search hook, so paging and the existing search still work. The status list always offers the four statuses Assessment.getStatus() derives, plus any custom status found in the loaded rows. Completed assessments are not part of the default queue, so selecting the Completed status reloads the page with showCompleted=true and the current filters in the query string, and AssessmentQueue loads all assessments instead of only the non-completed ones. Users restricted to their own assessments cannot open completed ones, so the flag is ignored for them. ../service/status takes the same flag so the report and peer-review icons are correct for the completed rows; its response is now cached client side and reapplied on every redraw, since filtering redraws far more often than paging did. Along the way: - getAllAssessments built its query by string concatenation and left a dangling comma when no completed clause was added, which is why the All type was unusable. Clauses are joined instead. - The queue's start/end columns used the format "yyy-MM-dd", which renders a 4-digit year by accident and would not sort or range-compare reliably.
Report generation commits the DOCX as soon as it exists and appends the other formats afterwards, so CheckStatus goes green while the PDF can still be minutes away and the finalize page picks up an incomplete set of formats. FinalReport gains a pdfPending flag (null-safe, absent on every record written before the split) and Reports gains a CheckPdfStatus action the finalize page can poll: 202 while a format is still rendering, 200 with the variant count once everything is stored. HibHelper gains rollback(), so a unit of work that fails part-way can unbind its transaction from the thread. Without it the next preJoin() tries to begin a nested transaction and fails, taking the following unit of work down with it - which is exactly what happens when the second format's write throws. The producer side of these hooks lives in the enterprise overlay (ReportGenThread, UploadReport).
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.
No description provided.