The Quality Assurance (QA) module controls the transition of results from the Editing stage through to Quality Assessed and ultimately Submitted. QA reviewers examine result content, record structured comments, and make go/return decisions. All actions are tracked in an immutable review history for audit purposes. All endpoints require theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/AllianceBioversityCIAT/onecgiar_pr/llms.txt
Use this file to discover all available pages before exploring further.
auth: <JWT> header. Endpoints that record QA decisions additionally require the authenticated user to hold an appropriate QA reviewer role.
Authentication and roles
QA decision endpoints require the user to hold an appropriate reviewer role for the result’s owning initiative or action area. Read-only endpoints (review history, pending queue) are accessible to any authenticated user with visibility of the result. Role enforcement is applied via
ValidRoleGuard and the @Roles decorator on the server.Status transition model
Results move through statuses as QA decisions are made:| ID | Name | Description |
|---|---|---|
| 1 | Editing | Result is being authored. Default on creation. |
| 2 | Quality Assessed | QA reviewer has assessed the result positively. |
| 3 | Submitted | Result has been formally submitted to the reporting cycle. |
| 4 | Discontinued | Result has been discontinued (terminal state). |
| 5 | Pending Review | Bilateral result awaiting reviewer decision. |
| 6 | Approved | Bilateral result approved by a reviewer. |
| 7 | Rejected | Bilateral result rejected; returned for revision. |
Editing (1) → Quality Assessed (2) → Submitted (3). A positive QA decision advances the status to Quality Assessed; returning a result with comments resets it to Editing.
QA log endpoints (/api/result-qaed/*)
The result-qaed module persists result_qaed_log records. Each log row captures the date, the reviewing user (qaed_user), and any comments made at the time of assessment.
The
result-qaed controller is currently a minimal scaffold. The QA workflow is primarily surfaced through the result review history (see below) and submission endpoints. The log table result_qaed_log is written by the service layer when QA transitions occur.result_qaed_log entity):
Primary key (bigint).
The result this log entry belongs to.
Date the QA action was taken (
YYYY-MM-DD).Free-text comments recorded by the QA reviewer. Nullable.
User id of the QA reviewer who made the decision.
Review history endpoints
The review history provides an immutable audit trail of every QA decision and bilateral review action taken on a result. Records are written each time a status transition occurs (approve, reject, or update).Get review history for a result
Review history records are stored in the
result_review_history table and surfaced via the result-status sub-module. Each record captures the action taken, the reviewer’s comment, and the timestamp.Internal result id whose review history you want to retrieve.
Array of review history records, ordered by
created_at descending.Submission endpoints (QA lifecycle triggers)
Status transitions are triggered through the submissions sub-module. These are the endpoints that advance or retract QA status.Submit a result for QA
Advances a result towardSubmitted (3) status. The result must already be Quality Assessed (2) or pass server-side validation to proceed.
Internal result id to submit.
Optional submission comment recorded in the review history.
Unsubmit (retract) a result
Returns a submitted result toEditing (1) status, allowing the author to make further changes.
Internal result id to retract.
Optional comment explaining the retraction.
Submit an IPSR innovation package
Submits an innovation package to the reporting cycle.Internal result id of the innovation package.
Unsubmit an IPSR innovation package
Retracts an innovation package submission.Internal result id of the innovation package.
Bilateral review decision endpoints
W3/bilateral results (source = "API") use a separate review workflow with Pending Review (5), Approved (6), and Rejected (7) statuses. These endpoints require the reviewer role for the respective bilateral portfolio.
Approve or reject a bilateral result
Internal result id. The result must be in
Pending Review (5) status."APPROVED" to advance to Approved (6), or "REJECTED" to move to Rejected (7).Explanation of the decision. Required when
decision is "REJECTED". Stored in the review history.Update bilateral data standard fields under review
Updates ToC fields and Minimum Data Standard fields of a bilateral result that is inPending Review status. Requires an update explanation when any field is modified.
Internal result id.
Explanation of what was updated and why.
Updated result title.
Updated result description.
Updated geographic scope identifier.
Update bilateral ToC metadata under review
Updates theresult_toc_result ToC metadata for a bilateral result in Pending Review status.
Internal result id.
Explanation of the metadata change.
Updated ToC result node id.
Validation module
Before a result or package can be submitted, a server-side validation check confirms that all required sections are complete. The validation module is accessible through the result sub-resources:Validation summary object.
Home / aggregate QA metrics
The home module exposes aggregate QA metrics used on the PRMS landing page. These give initiative leads and PMU staff a high-level view of QA pass rates per phase.QA pass rate aggregates for the current reporting phase.
Pending review count
Returns the count of results currently awaiting QA review for a specific Science Program.Program identifier (e.g.
SP01).QA workflow summary
The typical QA lifecycle for a standard result:- Author creates result —
status_id = 1(Editing). - Author completes all sections — validation module confirms completeness.
- Author submits —
PATCH /api/results/submissions/submit/:resultIdadvances toward QA queue. - QA reviewer examines result — checks content, evidence, geographic scope, partners, ToC alignment.
- Reviewer approves — result transitions to
Quality Assessed (2). AAPPROVEDrecord is written toresult_review_history. - Reviewer returns with comments — result reverts to
Editing (1). AREJECTEDrecord with the comment is written toresult_review_history. The author sees the comment and revises. - Repeat steps 3–6 as needed until approval.
- Final submission — from
Quality Assessed (2)the author submits again, advancing toSubmitted (3).
Only users with the appropriate QA reviewer role assignment for the result’s owning initiative or action area can record QA decisions. Authors cannot approve their own results. The server enforces this via
ValidRoleGuard.