From 50002e294b7da1098531b8adba9fbe4a68c2ddf2 Mon Sep 17 00:00:00 2001 From: Kenji Tanaka Date: Tue, 23 Jan 2024 14:31:30 -0500 Subject: [PATCH 1/2] :wrench: chore(deliverables): Update deliverables rules --- .../webapp/WEB-INF/crp/views/projects/projectDeliverable.ftl | 2 +- .../main/webapp/crp/js/projects/deliverables/deliverableInfo.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectDeliverable.ftl b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectDeliverable.ftl index 12f5e7fc6d..4f32df788f 100644 --- a/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectDeliverable.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/crp/views/projects/projectDeliverable.ftl @@ -3,7 +3,7 @@ [#assign currentSectionString = "project-${actionName?replace('/','-')}-${deliverableID}-phase-${(actualPhase.id)!}" /] [#assign pageLibs = ["select2","font-awesome","dropzone","blueimp-file-upload","jsUri", "flag-icon-css", "pickadate", "vue"] /] [#assign customJS = [ - "${baseUrlMedia}/js/projects/deliverables/deliverableInfo.js?20230420", + "${baseUrlMedia}/js/projects/deliverables/deliverableInfo.js?20240123", "${baseUrlMedia}/js/projects/deliverables/deliverableDissemination.js?20230810", "${baseUrlMedia}/js/projects/deliverables/deliverableQualityCheck.js?20220721", "${baseUrlCdn}/crp/js/feedback/feedbackAutoImplementation.js?20231017", diff --git a/marlo-web/src/main/webapp/crp/js/projects/deliverables/deliverableInfo.js b/marlo-web/src/main/webapp/crp/js/projects/deliverables/deliverableInfo.js index 796b879ef3..92a2fd2baa 100644 --- a/marlo-web/src/main/webapp/crp/js/projects/deliverables/deliverableInfo.js +++ b/marlo-web/src/main/webapp/crp/js/projects/deliverables/deliverableInfo.js @@ -579,7 +579,7 @@ function validateDeliverableStatus() { $statuses.find('option').prop("disabled", true); // Disable All $statuses.find('option[value="3"]').prop("disabled", false); // Enable Complete $statuses.find('option[value="5"]').prop("disabled", false); // Enable Cancelled - $statuses.val("3"); // Set Complete + //$statuses.val("3"); // Set Complete } else { $statuses.find('option[value="2"]').prop("disabled", true);// Disable On-going } From c973dfc4201f81f618a752e514594c27d5b6c538 Mon Sep 17 00:00:00 2001 From: Kenji Tanaka Date: Tue, 23 Jan 2024 15:40:30 -0500 Subject: [PATCH 2/2] :bug: fix(validation): Validate null deliverable type id --- .../ccafs/marlo/validation/projects/DeliverableValidator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/validation/projects/DeliverableValidator.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/validation/projects/DeliverableValidator.java index 3159f3380c..765e29bb68 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/validation/projects/DeliverableValidator.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/validation/projects/DeliverableValidator.java @@ -417,7 +417,8 @@ public void validate(BaseAction action, Deliverable deliverable, boolean saving) */ // Deliverable Quality Check if (deliverable.getDeliverableInfo(action.getActualPhase()).getDeliverableType() != null - && (deliverable.getDeliverableInfo(action.getActualPhase()).getDeliverableType().getId().intValue() == 51 + && (deliverable.getDeliverableInfo(action.getActualPhase()).getDeliverableType().getId() != null + && deliverable.getDeliverableInfo(action.getActualPhase()).getDeliverableType().getId().intValue() == 51 || deliverable.getDeliverableInfo(action.getActualPhase()).getDeliverableType().getId() .intValue() == 74)) { if (deliverable.getQualityCheck() != null) {