Skip to content

Commit

Permalink
more fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
wuall826 committed Dec 13, 2024
1 parent 667a69c commit d49424e
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public class DonorAssayReport extends Report {
Column.forString("Start Date", kase -> kase.getStartDate().toString()),
Column.forString("Latest Activity", kase -> kase.getLatestActivityDate().toString()),
Column.forString("Status", DonorAssayReport::getCaseStatus),
Column.forString("Completed",
kase -> CompletedGate.RELEASE.qualifyCase(kase) ? "Yes" : "No"),
Column.forString("Stopped/Paused", DonorAssayReport::getStoppedPausedStatus),
Column.forString("Stop/Pause Reason", DonorAssayReport::getStopPauseReason))) {
@Override
public List<Case> getData(CaseService caseService, JsonNode parameters) {
Expand Down Expand Up @@ -57,15 +60,23 @@ private static String getProjectPipelines(Case kase) {
private static String getCaseStatus(Case kase) {
if (CompletedGate.RELEASE.qualifyCase(kase)) {
return "Completed";
} else if (kase.isStopped()) {
return "Failed";
} else if (kase.getRequisition().isPaused()) {
return "Paused";
} else {
return "In Progress";
}
}

private static String getStoppedPausedStatus(Case kase) {
if (kase.isStopped()) {
return "Stopped";
} else if (kase.getRequisition().isPaused()) {
return "Paused";
} else {
return "Neither";
}
}

private static String getStopPauseReason(Case kase) {
if (kase.isStopped()) {
return kase.getRequisition().getStopReason() != null
Expand Down

0 comments on commit d49424e

Please sign in to comment.