Skip to content

Commit

Permalink
[GLT-3964] added QC notes to deliverables (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
djcooke authored Jan 8, 2024
1 parent cf0ee4e commit c60c681
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,30 @@ public class Deliverable {
private final LocalDate analysisReviewQcDate;
private final Boolean analysisReviewQcPassed;
private final String analysisReviewQcUser;
private final String analysisReviewQcNote;
private final LocalDate releaseApprovalQcDate;
private final Boolean releaseApprovalQcPassed;
private final String releaseApprovalQcUser;
private final String releaseApprovalQcNote;
private final LocalDate releaseQcDate;
private final Boolean releaseQcPassed;
private final String releaseQcUser;
private final String releaseQcNote;

private Deliverable(Builder builder) {
this.deliverableType = requireNonNull(builder.deliverableType);
this.analysisReviewQcDate = builder.analysisReviewQcDate;
this.analysisReviewQcPassed = builder.analysisReviewQcPassed;
this.analysisReviewQcUser = builder.analysisReviewQcUser;
this.analysisReviewQcNote = builder.analysisReviewQcNote;
this.releaseApprovalQcDate = builder.releaseApprovalQcDate;
this.releaseApprovalQcPassed = builder.releaseApprovalQcPassed;
this.releaseApprovalQcUser = builder.releaseApprovalQcUser;
this.releaseApprovalQcNote = builder.releaseApprovalQcNote;
this.releaseQcDate = builder.releaseQcDate;
this.releaseQcPassed = builder.releaseQcPassed;
this.releaseQcUser = builder.releaseQcUser;
this.releaseQcNote = builder.releaseQcNote;
}

public DeliverableType getDeliverableType() {
Expand All @@ -49,6 +55,10 @@ public String getAnalysisReviewQcUser() {
return analysisReviewQcUser;
}

public String getAnalysisReviewQcNote() {
return analysisReviewQcNote;
}

public LocalDate getReleaseApprovalQcDate() {
return releaseApprovalQcDate;
}
Expand All @@ -61,6 +71,10 @@ public String getReleaseApprovalQcUser() {
return releaseApprovalQcUser;
}

public String getReleaseApprovalQcNote() {
return releaseApprovalQcNote;
}

public LocalDate getReleaseQcDate() {
return releaseQcDate;
}
Expand All @@ -73,19 +87,26 @@ public String getReleaseQcUser() {
return releaseQcUser;
}

public String getReleaseQcNote() {
return releaseQcNote;
}

@JsonPOJOBuilder(withPrefix = "")
public static class Builder {

private DeliverableType deliverableType;
private LocalDate analysisReviewQcDate;
private Boolean analysisReviewQcPassed;
private String analysisReviewQcUser;
private String analysisReviewQcNote;
private LocalDate releaseApprovalQcDate;
private Boolean releaseApprovalQcPassed;
private String releaseApprovalQcUser;
private String releaseApprovalQcNote;
private LocalDate releaseQcDate;
private Boolean releaseQcPassed;
private String releaseQcUser;
private String releaseQcNote;

public Builder deliverableType(DeliverableType deliverableType) {
this.deliverableType = deliverableType;
Expand All @@ -107,6 +128,11 @@ public Builder analysisReviewQcUser(String analysisReviewQcUser) {
return this;
}

public Builder analysisReviewQcNote(String analysisReviewQcNote) {
this.analysisReviewQcNote = analysisReviewQcNote;
return this;
}

public Builder releaseApprovalQcDate(LocalDate releaseApprovalQcDate) {
this.releaseApprovalQcDate = releaseApprovalQcDate;
return this;
Expand All @@ -122,6 +148,11 @@ public Builder releaseApprovalQcUser(String releaseApprovalQcUser) {
return this;
}

public Builder releaseApprovalQcNote(String releaseApprovalQcNote) {
this.releaseApprovalQcNote = releaseApprovalQcNote;
return this;
}

public Builder releaseQcDate(LocalDate releaseQcDate) {
this.releaseQcDate = releaseQcDate;
return this;
Expand All @@ -137,6 +168,11 @@ public Builder releaseQcUser(String releaseQcUser) {
return this;
}

public Builder releaseQcNote(String releaseQcNote) {
this.releaseQcNote = releaseQcNote;
return this;
}

public Deliverable build() {
return new Deliverable(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -747,12 +747,15 @@ private List<Deliverable> parseDeliverables(JsonNode deliverablesNode) throws Da
.analysisReviewQcDate(parseDate(node, "analysis_review_qc_date"))
.analysisReviewQcPassed(parseQcPassed(node, "analysis_review_qc_state", false))
.analysisReviewQcUser(parseString(node, "analysis_review_qc_user"))
.analysisReviewQcNote(parseString(node, "analysis_review_qc_note"))
.releaseApprovalQcDate(parseDate(node, "release_approval_qc_date"))
.releaseApprovalQcPassed(parseQcPassed(node, "release_approval_qc_state", false))
.releaseApprovalQcUser(parseString(node, "release_approval_qc_user"))
.releaseApprovalQcNote(parseString(node, "release_approval_qc_note"))
.releaseQcDate(parseDate(node, "release_qc_date"))
.releaseQcPassed(parseQcPassed(node, "release_qc_state", false))
.releaseQcUser(parseString(node, "release_qc_user"))
.releaseQcNote(parseString(node, "release_qc_note"))
.build());
}
return deliverables;
Expand Down
5 changes: 4 additions & 1 deletion cardea-server/src/test/resources/testdata/cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,15 @@
"analysis_review_qc_state": "Ready",
"analysis_review_qc_user": "Person",
"analysis_review_qc_date": "2021-08-10",
"analysis_review_qc_note": "ok",
"release_approval_qc_state": null,
"release_approval_qc_user": null,
"release_approval_qc_date": null,
"release_approval_qc_note": null,
"release_qc_state": null,
"release_qc_user": null,
"release_qc_date": null
"release_qc_date": null,
"release_qc_note": null
}
],
"requisition_id": 512,
Expand Down
1 change: 1 addition & 0 deletions changes/add_deliverable_qcNotes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
QC notes to deliverables

0 comments on commit c60c681

Please sign in to comment.