Skip to content

Assessment queue filters and report status - #146

Merged
summitt merged 2 commits into
mainfrom
assessment-queue-filters-and-report-status
Aug 14, 2026
Merged

Assessment queue filters and report status#146
summitt merged 2 commits into
mainfrom
assessment-queue-filters-and-report-status

Conversation

@summitt

@summitt summitt commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

No description provided.

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).
@summitt
summitt merged commit b32afdf into main Aug 14, 2026
5 of 6 checks passed
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.

1 participant