[DT-4061] Add study-scoped DAR summaries and research outputs - #3053
Open
otchet-broad wants to merge 1 commit into
Open
[DT-4061] Add study-scoped DAR summaries and research outputs#3053otchet-broad wants to merge 1 commit into
otchet-broad wants to merge 1 commit into
Conversation
otchet-broad
marked this pull request as ready for review
September 8, 2026 20:45
otchet-broad
requested review from
kevinmarete and
rushtong
and removed request for
a team
September 8, 2026 20:45
Adds GET /api/metrics/dar-summaries/study/{studyId} and GET
/api/metrics/research-outputs/study/{studyId}. The study-scoped summary
query does the whole study in one round trip rather than re-running the
per-dataset query once per dataset.
A DAR qualifies for a study summary when it was approved on one of the
study's datasets or is a closeout against one of them, and each row is
sourced from the most recently submitted qualifying DAR in its collection.
Sourcing from the collection's newest submission instead would let a
pending progress report — a submitted child DAR with no election of its
own — overwrite the grant's title, RUS, and date and reset its
current/expired chip.
Research outputs aggregate the presentations, publications, and
intellectual properties reported across a study's progress reports.
DarMetricsSummary gains submissionDate, piName, and institutionName.
piName prefers the PI recorded on the DAR itself so the metric stays a
stable record of what was granted, falling back to the submitter for DARs
predating that field; the DAR's own institution field is deprecated and no
longer written, so the submitter's current institution is the only source.
These three fields are also now returned by the existing per-dataset
endpoint — additive only, so existing consumers are unaffected.
Reads go through DatasetService#verifyStudyVisibilityAccess, matching the
study endpoint. No migration.
Note for review: MetricsServiceTest carries an unused
generateDarMetricsSummary(String, Timestamp) overload that can be dropped.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
otchet-broad
force-pushed
the
otchet-dt-4061-study-comments
branch
from
September 8, 2026 21:58
0d6f3c0 to
f16b34c
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-dar-metrics
branch
from
September 8, 2026 21:58
2014320 to
e31cd4a
Compare
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.
Base: branch 3 · 15 files, +729/-6 · Migration: no · UI impact: additive fields on one existing endpoint
Adds
GET /api/metrics/dar-summaries/study/{studyId}andGET /api/metrics/research-outputs/study/{studyId}. The study-scoped summaryquery covers the whole study in one round trip rather than re-running the
per-dataset query once per dataset.
A DAR qualifies for a study summary when it was approved on one of the
study's datasets or is a closeout against one of them, and each row is
sourced from the most recently submitted qualifying DAR in its collection.
That constraint is the subtle part and worth a careful read: sourcing from
the collection's newest submission instead would let a pending progress
report — a submitted child DAR with no election of its own — overwrite the
grant's title, RUS, and date and reset its current/expired chip.
Research outputs aggregate the presentations, publications, and intellectual
properties reported across a study's progress reports.
DarMetricsSummarygainssubmissionDate,piName, andinstitutionName.piNameprefers the PI recorded on the DAR itself so the metric stays astable record of what was granted, falling back to the submitter for DARs
predating that field; the DAR's own
institutionfield is deprecated and nolonger written, so the submitter's current institution is the only available
source. These three fields are also now returned by the existing
per-dataset endpoint — additive, so existing consumers are unaffected, but
it is the one existing response this branch touches.
Reads go through
verifyStudyVisibilityAccess.Minor:
MetricsServiceTestcarries an unusedgenerateDarMetricsSummary(String, Timestamp)overload that can be dropped.Depends on: branch 1 (visibility gate).
Where this sits in the DT-4061 stack
otchet-dt-3990-study-ratings-pi-detailswas too large to review meaningfully(95 files, +8168), so it was split into eight PRs. This PR targets
otchet-dt-4061-study-comments,not
develop, so its diff shows only its own work.otchet-dt-4061-study-visibility-authzdevelopotchet-dt-4061-study-patch-ownershipotchet-dt-4061-study-visibility-authzotchet-dt-4061-study-pi-detailsotchet-dt-4061-study-visibility-authzotchet-dt-4061-study-commentsotchet-dt-4061-study-pi-detailsotchet-dt-4061-study-dar-metrics← this PRotchet-dt-4061-study-commentsotchet-dt-4061-study-recommendationsotchet-dt-4061-study-dar-metricsotchet-dt-4061-study-asset-fieldsotchet-dt-4061-study-recommendationsotchet-dt-4061-study-asset-endpointsotchet-dt-4061-study-asset-fieldsBranch 1b is a sibling rather than a link in the chain: nothing depends on it,
so it can be held or dropped without blocking the others. Land the numbered
chain in order — merging out of order, or squash-merging, will require rebasing
the descendants.
The split is verified lossless: branch 7 plus 1b reproduces the original branch
exactly, apart from five
scripts/verify-study-*.shhelper scripts that weredropped at the author's request.
./mvnw test-compilepasses on each branchindependently.
🤖 Generated with Claude Code