From f595f451d6e93bf3cce7d5ddddd3287d57f2ca98 Mon Sep 17 00:00:00 2001 From: Kenji Tanaka Date: Wed, 21 Feb 2024 13:56:46 -0500 Subject: [PATCH 1/8] :wrench: chore(Shfrm contribution): Get previous narrative for AR phase --- .../action/projects/DeliverableAction.java | 32 +++++++++++++++++-- .../global/macros/deliverableMacros.ftl | 6 ++++ 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/DeliverableAction.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/DeliverableAction.java index ce40f8ab23..cce06fd70a 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/DeliverableAction.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/DeliverableAction.java @@ -314,7 +314,7 @@ public class DeliverableAction extends BaseAction { private String handle; private String disseminationURL; private String soilIndicatorsText; - + private String previousContributionNarrative; private List focusLevels; // HJ 08/01/2019 new fileds Deliverable Partnerships @@ -687,6 +687,23 @@ public void fillClusterParticipantsList() { } } + public void fillPreviousContributionNarrative() { + try { + if (this.isReportingActive()) { + Phase previousPhase = phaseManager.findPreviousPhase(this.getActualPhase().getId()); + if (previousPhase != null) { + if (deliverable.getDeliverableInfo(previousPhase) != null + && deliverable.getDeliverableInfo(previousPhase).getShfrmContributionNarrative() != null) { + previousContributionNarrative = + deliverable.getDeliverableInfo(previousPhase).getShfrmContributionNarrative(); + } + } + } + } catch (Exception e) { + Log.error("error getting previous contribution narrative " + e); + } + } + public void fillSoilIndicatorsText() { try { soilIndicatorsText = null; @@ -811,6 +828,7 @@ public long getActualClusterParticipantID() { } } + public List getAnswers() { return answers; } @@ -820,7 +838,6 @@ public List getAnswersDataDic() { return answersDataDic; } - private Path getAutoSaveFilePath() { // get the class simple name @@ -962,6 +979,7 @@ public List getMyProjects() { return myProjects; } + public List getPartnerInstitutions() { return partnerInstitutions; } @@ -971,7 +989,6 @@ public List getPartnerPersons() { return partnerPersons; } - public List getPartners() { return partners; } @@ -998,6 +1015,10 @@ public long[] getPersonsIds(DeliverableUserPartnership deliverableUserPartnershi return EMPTY_ARRAY; } + public String getPreviousContributionNarrative() { + return previousContributionNarrative; + } + public List getProgramOutcomes() { return programOutcomes; } @@ -1617,6 +1638,7 @@ public void prepare() throws Exception { } this.fillSoilIndicatorsText(); + this.fillPreviousContributionNarrative(); } // Expected Study Geographic Regions List @@ -4390,6 +4412,10 @@ public void setPartners(List partners) { this.partners = partners; } + public void setPreviousContributionNarrative(String previousContributionNarrative) { + this.previousContributionNarrative = previousContributionNarrative; + } + public void setProgramOutcomes(List programOutcomes) { this.programOutcomes = programOutcomes; } diff --git a/marlo-web/src/main/webapp/WEB-INF/global/macros/deliverableMacros.ftl b/marlo-web/src/main/webapp/WEB-INF/global/macros/deliverableMacros.ftl index 58cf8b8725..1dae9b5bec 100644 --- a/marlo-web/src/main/webapp/WEB-INF/global/macros/deliverableMacros.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/global/macros/deliverableMacros.ftl @@ -1529,6 +1529,12 @@ [#-- Shfrm Contribution Narrative --] [#if reportingActive] + [#-- Previous narrative --] + [#if previousContribionNarrative?has_content] +
+ [@customForm.textArea name="deliverable.deliverableInfo.shfrmContributionNarrative" value="${(deliverable.deliverableInfo.shfrmContributionNarrative)!}" i18nkey="deliverable.shfrmContribution.narrative.reporting" placeholder="" className="limitWords-200" required=false editable=false /] +
+ [/#if]
[@customForm.textArea name="deliverable.deliverableInfo.shfrmContributionNarrative" value="${(deliverable.deliverableInfo.shfrmContributionNarrative)!}" i18nkey="deliverable.shfrmContribution.narrative.reporting" placeholder="" className="limitWords-200" required=true editable=editable /]
From 7ac6bb9fa0a4ff7d4e319ea438bf40c4ad255e46 Mon Sep 17 00:00:00 2001 From: Kenji Tanaka Date: Wed, 21 Feb 2024 13:58:08 -0500 Subject: [PATCH 2/8] :wrench: chore(Shfrm contribution): Update deliverable validator --- .../ccafs/marlo/validation/projects/DeliverableValidator.java | 3 +++ 1 file changed, 3 insertions(+) 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 0683f9cc44..91eb013ac6 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 @@ -610,6 +610,9 @@ public void validate(BaseAction action, Deliverable deliverable, boolean saving) action.addMissingField("deliverable.shfrmPriorityActions"); action.getInvalidFields().put("list-deliverable.shfrmPriorityActions", InvalidFieldsMessages.EMPTYFIELD); + + action.getInvalidFields().put("list-deliverable.shfrmPriorityActions[" + indexJ + "]", + InvalidFieldsMessages.EMPTYFIELD); /* * action.addMessage(action.getText("deliverable.shfrmSubActions[" + indexJ + "]")); * action.addMissingField("deliverable.shfrmSubActions[" + indexJ + "]"); From 27223c0e737547f004eba21500a2d71377cc479e Mon Sep 17 00:00:00 2001 From: Kenji Tanaka Date: Wed, 21 Feb 2024 14:23:10 -0500 Subject: [PATCH 3/8] :wrench: chore(Migration): Create shfrm_contribution_narrative column for ar --- .../V2_6_0_20240221_1420__CreateContributionARColumn.sql | 1 + .../src/main/webapp/WEB-INF/global/macros/homeDashboard.ftl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 marlo-web/src/main/resources/database/migrations/V2_6_0_20240221_1420__CreateContributionARColumn.sql diff --git a/marlo-web/src/main/resources/database/migrations/V2_6_0_20240221_1420__CreateContributionARColumn.sql b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240221_1420__CreateContributionARColumn.sql new file mode 100644 index 0000000000..4c0619b04f --- /dev/null +++ b/marlo-web/src/main/resources/database/migrations/V2_6_0_20240221_1420__CreateContributionARColumn.sql @@ -0,0 +1 @@ +ALTER TABLE deliverables_info ADD shfrm_contribution_narrative_ar text NULL; diff --git a/marlo-web/src/main/webapp/WEB-INF/global/macros/homeDashboard.ftl b/marlo-web/src/main/webapp/WEB-INF/global/macros/homeDashboard.ftl index da3e851146..7096ad99cf 100644 --- a/marlo-web/src/main/webapp/WEB-INF/global/macros/homeDashboard.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/global/macros/homeDashboard.ftl @@ -21,7 +21,7 @@ [#-- Has draft version (Auto-save) --] [#--assign hasDraft = (action.getAutoSaveFilePath(deliverable.class.simpleName, "deliverable", deliverable.id))!false /--] [#-- Is Complete --] - [#assign isDeliverableComplete = action.isDeliverableComplete(deliverable.deliverableId, actualPhase.id) /] + [#assign isDeliverableComplete = action.isDeliverableComplete(deliverable.deliverableId, actualPhase.id)!false /] [#-- To Report --] [#local toReport = reportingActive && !isDeliverableComplete ] From 0f034dccf6625940a7a2069d2ee50b4ad2fd9d8c Mon Sep 17 00:00:00 2001 From: Kenji Tanaka Date: Wed, 21 Feb 2024 14:27:41 -0500 Subject: [PATCH 4/8] :wrench: chore(Shfrm contribution): Update deliverable model --- .../ccafs/marlo/data/model/DeliverableInfo.java | 17 ++++++++++++++--- .../resources/xmls/DeliverablesInfo.hbm.xml | 3 +++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableInfo.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableInfo.java index 3bb1db091c..aaca7bf79c 100644 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableInfo.java +++ b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/DeliverableInfo.java @@ -51,6 +51,8 @@ public class DeliverableInfo extends MarloAuditableEntity implements java.io.Ser private Boolean contributingShfrm; @Expose private String shfrmContributionNarrative; + @Expose + private String shfrmContributionNarrativeAR; public DeliverableInfo() { } @@ -125,6 +127,10 @@ public String getShfrmContributionNarrative() { return shfrmContributionNarrative; } + public String getShfrmContributionNarrativeAR() { + return shfrmContributionNarrativeAR; + } + public Integer getStatus() { return status; } @@ -191,6 +197,7 @@ public Boolean isCompleted() { return false; } + /** * Check if the deliverables is from a previous year for the current cycle * Used in Project.getCurrentDeliverables and Project.getPreviousDeliverables to generate the deliverable list and; @@ -371,25 +378,24 @@ public boolean requeriedFair() { return false; } - public void setAdoptedLicense(Boolean adoptedLicense) { this.adoptedLicense = adoptedLicense; } + public void setContributingShfrm(Boolean contributingShfrm) { this.contributingShfrm = contributingShfrm; } - public void setCrpClusterKeyOutput(CrpClusterKeyOutput crpClusterKeyOutput) { this.crpClusterKeyOutput = crpClusterKeyOutput; } + public void setCrpProgramOutcome(CrpProgramOutcome crpProgramOutcome) { this.crpProgramOutcome = crpProgramOutcome; } - public void setDeliverable(Deliverable deliverable) { this.deliverable = deliverable; } @@ -434,6 +440,10 @@ public void setShfrmContributionNarrative(String shfrmContributionNarrative) { this.shfrmContributionNarrative = shfrmContributionNarrative; } + public void setShfrmContributionNarrativeAR(String shfrmContributionNarrativeAR) { + this.shfrmContributionNarrativeAR = shfrmContributionNarrativeAR; + } + public void setStatus(Integer status) { this.status = status; } @@ -471,6 +481,7 @@ public void updateDeliverableInfo(DeliverableInfo update) { this.setRegion(update.getRegion()); this.setContributingShfrm(update.getContributingShfrm()); this.setShfrmContributionNarrative(update.getShfrmContributionNarrative()); + this.setShfrmContributionNarrativeAR(update.getShfrmContributionNarrativeAR()); } } diff --git a/marlo-data/src/main/resources/xmls/DeliverablesInfo.hbm.xml b/marlo-data/src/main/resources/xmls/DeliverablesInfo.hbm.xml index abcc2c7770..98a8a0cb5d 100644 --- a/marlo-data/src/main/resources/xmls/DeliverablesInfo.hbm.xml +++ b/marlo-data/src/main/resources/xmls/DeliverablesInfo.hbm.xml @@ -84,6 +84,9 @@ + + + From a0589944bb304dbe5c602f282238ad546ac37425 Mon Sep 17 00:00:00 2001 From: Kenji Tanaka Date: Wed, 21 Feb 2024 14:34:15 -0500 Subject: [PATCH 5/8] :wrench: chore(Shfrm contribution): Update shfrm validators --- .../crp/admin/ShfrmManagementAction.java | 29 +++++++++++++++++-- .../projects/DeliverableValidator.java | 3 +- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/crp/admin/ShfrmManagementAction.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/crp/admin/ShfrmManagementAction.java index 8072c56966..b2e22ecaed 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/crp/admin/ShfrmManagementAction.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/crp/admin/ShfrmManagementAction.java @@ -19,9 +19,11 @@ import org.cgiar.ccafs.marlo.data.model.ShfrmPriorityAction; import org.cgiar.ccafs.marlo.data.model.ShfrmSubAction; import org.cgiar.ccafs.marlo.utils.APConfig; +import org.cgiar.ccafs.marlo.utils.InvalidFieldsMessages; import java.util.ArrayList; import java.util.Collection; +import java.util.HashMap; import java.util.List; import java.util.Objects; import java.util.Set; @@ -29,6 +31,7 @@ import javax.inject.Inject; +import org.jfree.util.Log; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -310,8 +313,30 @@ public void setPriorityActions(List priorityActions) { @Override public void validate() { - if (save) { - // validator.validate(this, feedbackFields); + try { + if (save) { + HashMap error = new HashMap<>(); + // validator.validate(this, feedbackFields); + if (this.priorityActions != null && !this.priorityActions.isEmpty()) { + int indexJ = 0; + for (ShfrmPriorityAction priorityAction : this.priorityActions) { + if (priorityAction != null) { + + if (!(priorityAction.getName() != null && priorityAction.getName().length() <= 100)) { + error.put("input-.priorityActions[" + indexJ + "].name", InvalidFieldsMessages.EMPTYFIELD); + } + if (!(priorityAction.getDescription() != null && priorityAction.getDescription().length() <= 200)) { + error.put("input-.priorityActions[" + indexJ + "].description", InvalidFieldsMessages.EMPTYFIELD); + } + } + indexJ++; + } + this.setInvalidFields(error); + + } + } + } catch (Exception e) { + Log.error("validating error " + e); } } } \ No newline at end of file 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 91eb013ac6..ed129df736 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 @@ -611,7 +611,8 @@ public void validate(BaseAction action, Deliverable deliverable, boolean saving) action.getInvalidFields().put("list-deliverable.shfrmPriorityActions", InvalidFieldsMessages.EMPTYFIELD); - action.getInvalidFields().put("list-deliverable.shfrmPriorityActions[" + indexJ + "]", + action.getInvalidFields().put( + "list-deliverable.shfrmPriorityActions[" + indexJ + "].shfrmSubActions[-1]", InvalidFieldsMessages.EMPTYFIELD); /* * action.addMessage(action.getText("deliverable.shfrmSubActions[" + indexJ + "]")); From f8d8fee8d89aacd9426cd3abb40741a18efd3cd7 Mon Sep 17 00:00:00 2001 From: Kenji Tanaka Date: Wed, 21 Feb 2024 19:24:22 -0500 Subject: [PATCH 6/8] :wrench: chore(Shfrm contribution): Create new shfrm deliverable labels --- marlo-web/src/main/resources/custom/aicrra.properties | 2 ++ marlo-web/src/main/resources/global.properties | 2 ++ 2 files changed, 4 insertions(+) diff --git a/marlo-web/src/main/resources/custom/aicrra.properties b/marlo-web/src/main/resources/custom/aicrra.properties index 5f4a97d3fe..1f7a27271b 100644 --- a/marlo-web/src/main/resources/custom/aicrra.properties +++ b/marlo-web/src/main/resources/custom/aicrra.properties @@ -938,6 +938,8 @@ deliverable.shfrmContribution.priorityAction.help=Select a priority action deliverable.shfrmContribution.subAction=To which specific sub-action of the SHFRM is this deliverable contributing to? deliverable.shfrmContribution.subAction.help=Select sub-action(s) deliverable.shfrmContribution.indicators.help=Soil Indicator(s): +deliverable.shfrmContribution.narrative.reporting.readText=How this deliverable is expecting to contribute to SHFRM +deliverable.shfrmContribution.narrative.planning.readText=How this deliverable is planning to contribute to SHFRM intellectualAsset.fillingType=Type of filling intellectualAsset.patentStatus=Patent status diff --git a/marlo-web/src/main/resources/global.properties b/marlo-web/src/main/resources/global.properties index ae3a07054d..7afffa59a4 100644 --- a/marlo-web/src/main/resources/global.properties +++ b/marlo-web/src/main/resources/global.properties @@ -941,6 +941,8 @@ deliverable.shfrmContribution.priorityAction.help=Select a priority action deliverable.shfrmContribution.subAction=To which specific sub-action of the SHFRM is this deliverable contributing to? deliverable.shfrmContribution.subAction.help=Select sub-action(s) deliverable.shfrmContribution.indicators.help=Soil Indicator(s): +deliverable.shfrmContribution.narrative.reporting.readText=How this deliverable is expecting to contribute to SHFRM +deliverable.shfrmContribution.narrative.planning.readText=How this deliverable is planning to contribute to SHFRM intellectualAsset.fillingType=Type of filling intellectualAsset.patentStatus=Patent status From 1e0791ad3e10d33c98511c842f2772e30ff49afe Mon Sep 17 00:00:00 2001 From: Kenji Tanaka Date: Wed, 21 Feb 2024 19:25:44 -0500 Subject: [PATCH 7/8] :wrench: chore(Shfrm contribution): Update shfrm management classes --- .../crp/admin/ShfrmManagementAction.java | 21 ------------------- .../crp/views/admin/shfrmManagement.ftl | 4 ++-- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/crp/admin/ShfrmManagementAction.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/crp/admin/ShfrmManagementAction.java index b2e22ecaed..7ef57cccb7 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/crp/admin/ShfrmManagementAction.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/crp/admin/ShfrmManagementAction.java @@ -19,11 +19,9 @@ import org.cgiar.ccafs.marlo.data.model.ShfrmPriorityAction; import org.cgiar.ccafs.marlo.data.model.ShfrmSubAction; import org.cgiar.ccafs.marlo.utils.APConfig; -import org.cgiar.ccafs.marlo.utils.InvalidFieldsMessages; import java.util.ArrayList; import java.util.Collection; -import java.util.HashMap; import java.util.List; import java.util.Objects; import java.util.Set; @@ -315,25 +313,6 @@ public void setPriorityActions(List priorityActions) { public void validate() { try { if (save) { - HashMap error = new HashMap<>(); - // validator.validate(this, feedbackFields); - if (this.priorityActions != null && !this.priorityActions.isEmpty()) { - int indexJ = 0; - for (ShfrmPriorityAction priorityAction : this.priorityActions) { - if (priorityAction != null) { - - if (!(priorityAction.getName() != null && priorityAction.getName().length() <= 100)) { - error.put("input-.priorityActions[" + indexJ + "].name", InvalidFieldsMessages.EMPTYFIELD); - } - if (!(priorityAction.getDescription() != null && priorityAction.getDescription().length() <= 200)) { - error.put("input-.priorityActions[" + indexJ + "].description", InvalidFieldsMessages.EMPTYFIELD); - } - } - indexJ++; - } - this.setInvalidFields(error); - - } } } catch (Exception e) { Log.error("validating error " + e); diff --git a/marlo-web/src/main/webapp/WEB-INF/crp/views/admin/shfrmManagement.ftl b/marlo-web/src/main/webapp/WEB-INF/crp/views/admin/shfrmManagement.ftl index 20e9c6158d..e6c07ab4cd 100644 --- a/marlo-web/src/main/webapp/WEB-INF/crp/views/admin/shfrmManagement.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/crp/views/admin/shfrmManagement.ftl @@ -149,12 +149,12 @@
- [@customForm.input name="${name}.name" i18nkey="shfrmManagement.priorityActions.title" className="name limitWords-100" required=true /] + [@customForm.input name="${name}.name" i18nkey="shfrmManagement.priorityActions.title" className="name" required=true /]
[#-- Action description --]
- [@customForm.input name="${name}.description" i18nkey="shfrmManagement.priorityActions.description" className="description limitWords-100" required=true /] + [@customForm.input name="${name}.description" i18nkey="shfrmManagement.priorityActions.description" className="description" required=true /]
From c9d48a856d1c290d2b414136d2fc33402b429e68 Mon Sep 17 00:00:00 2001 From: Kenji Tanaka Date: Wed, 21 Feb 2024 21:06:09 -0500 Subject: [PATCH 8/8] :wrench: chore(Shfrm contribution): Update deliverable delete model --- .../DeliverableShfrmPriorityActionDAO.java | 3 + ...eliverableShfrmPriorityActionMySQLDAO.java | 12 +++ ...DeliverableShfrmPriorityActionManager.java | 3 + ...verableShfrmPriorityActionManagerImpl.java | 11 ++- .../DeliverableShfrmSubActionManagerImpl.java | 88 +++++++++++++----- .../action/projects/DeliverableAction.java | 90 +++++++++++-------- .../projects/DeliverableValidator.java | 47 ++++++---- .../global/macros/deliverableMacros.ftl | 4 +- 8 files changed, 175 insertions(+), 83 deletions(-) diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/DeliverableShfrmPriorityActionDAO.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/DeliverableShfrmPriorityActionDAO.java index 59e77d918d..76f4292b05 100644 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/DeliverableShfrmPriorityActionDAO.java +++ b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/DeliverableShfrmPriorityActionDAO.java @@ -57,6 +57,9 @@ public interface DeliverableShfrmPriorityActionDAO { public List findByDeliverableAndPhase(long deliverableId, long phaseId); + public List findByDeliverablePriorityActionAndPhase(long deliverableId, + long priorityActionId, long phaseId); + /** * This method saves the information of the given deliverableShfrmPriorityAction diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/DeliverableShfrmPriorityActionMySQLDAO.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/DeliverableShfrmPriorityActionMySQLDAO.java index b9f8064b03..a84e0d6020 100644 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/DeliverableShfrmPriorityActionMySQLDAO.java +++ b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/mysql/DeliverableShfrmPriorityActionMySQLDAO.java @@ -85,6 +85,18 @@ public List findByDeliverableAndPhase(long deliv return null; } + @Override + public List findByDeliverablePriorityActionAndPhase(long deliverableId, + long priorityActionId, long phaseId) { + String query = "from " + DeliverableShfrmPriorityAction.class.getName() + " where is_active=1 and deliverable_id=" + + deliverableId + " and shfrm_priority_action_id=" + priorityActionId + " and id_phase=" + phaseId; + List list = super.findAll(query); + if (list.size() > 0) { + return list; + } + return null; + } + @Override public DeliverableShfrmPriorityAction save(DeliverableShfrmPriorityAction deliverableShfrmPriorityAction) { if (deliverableShfrmPriorityAction.getId() == null) { diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/DeliverableShfrmPriorityActionManager.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/DeliverableShfrmPriorityActionManager.java index 217e982ac2..1b15093969 100644 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/DeliverableShfrmPriorityActionManager.java +++ b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/DeliverableShfrmPriorityActionManager.java @@ -53,6 +53,9 @@ public interface DeliverableShfrmPriorityActionManager { public List findByDeliverableAndPhase(long deliverableId, long phaseId); + public List findByDeliverablePriorityActionAndPhase(long deliverableId, + long priorityActionId, long phaseId); + /** * This method gets a deliverableShfrmPriorityAction object by a given deliverableShfrmPriorityAction identifier. diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmPriorityActionManagerImpl.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmPriorityActionManagerImpl.java index b3147077b7..a46fc66a06 100644 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmPriorityActionManagerImpl.java +++ b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmPriorityActionManagerImpl.java @@ -109,6 +109,15 @@ public List findByDeliverableAndPhase(long deliv } + @Override + public List findByDeliverablePriorityActionAndPhase(long deliverableId, + long priorityActionId, long phaseId) { + return deliverableShfrmPriorityActionDAO.findByDeliverablePriorityActionAndPhase(deliverableId, priorityActionId, + phaseId); + + } + + @Override public DeliverableShfrmPriorityAction getDeliverableShfrmPriorityActionById(long deliverableShfrmPriorityActionID) { @@ -134,7 +143,7 @@ public DeliverableShfrmPriorityAction getDeliverableShfrmPriorityActionById(long public void saveDeliverableShfrmPriorityActionPhase(Phase next, long deliverableId, DeliverableShfrmPriorityAction deliverableShfrmPriorityAction) { Phase phase = phaseDAO.find(next.getId()); - DeliverableShfrmPriorityAction deliverableShfrmPriorityActionPhase = new DeliverableShfrmPriorityAction(); + DeliverableShfrmPriorityAction deliverableShfrmPriorityActionPhase = null; try { deliverableShfrmPriorityActionPhase = deliverableShfrmPriorityActionDAO .findByDeliverableAndPhase(deliverableId, phase.getId()).stream() diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmSubActionManagerImpl.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmSubActionManagerImpl.java index 4811696bd4..3ac04b5666 100644 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmSubActionManagerImpl.java +++ b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/impl/DeliverableShfrmSubActionManagerImpl.java @@ -15,9 +15,11 @@ package org.cgiar.ccafs.marlo.data.manager.impl; +import org.cgiar.ccafs.marlo.data.dao.DeliverableShfrmPriorityActionDAO; import org.cgiar.ccafs.marlo.data.dao.DeliverableShfrmSubActionDAO; import org.cgiar.ccafs.marlo.data.dao.PhaseDAO; import org.cgiar.ccafs.marlo.data.manager.DeliverableShfrmSubActionManager; +import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmPriorityAction; import org.cgiar.ccafs.marlo.data.model.DeliverableShfrmSubAction; import org.cgiar.ccafs.marlo.data.model.Phase; @@ -39,12 +41,14 @@ public class DeliverableShfrmSubActionManagerImpl implements DeliverableShfrmSub // Managers private DeliverableShfrmSubActionDAO deliverableShfrmSubActionDAO; + private DeliverableShfrmPriorityActionDAO deliverableShfrmPriorityActionDAO; private PhaseDAO phaseDAO; @Inject public DeliverableShfrmSubActionManagerImpl(DeliverableShfrmSubActionDAO deliverableShfrmSubActionDAO, - PhaseDAO phaseDAO) { + PhaseDAO phaseDAO, DeliverableShfrmPriorityActionDAO deliverableShfrmPriorityActionDAO) { this.deliverableShfrmSubActionDAO = deliverableShfrmSubActionDAO; + this.deliverableShfrmPriorityActionDAO = deliverableShfrmPriorityActionDAO; this.phaseDAO = phaseDAO; } @@ -65,12 +69,15 @@ public void deleteDeliverableShfrmSubAction(long deliverableShfrmSubActionId) { public void deleteDeliverableShfrmSubActionPhase(Phase next, DeliverableShfrmSubAction deliverableShfrmSubAction) { Phase phase = phaseDAO.find(next.getId()); + DeliverableShfrmPriorityAction deliverablePriorityActionPhase = + this.findDeliverablePriorityActionByDeliverablePriorityActionAndPhase(deliverableShfrmSubAction, phase); DeliverableShfrmSubAction deliverableShfrmSubActionDelete = new DeliverableShfrmSubAction(); - deliverableShfrmSubActionDelete = deliverableShfrmSubActionDAO - .findByPriorityActionPhaseAndSubAction(deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getId(), - phase.getId(), deliverableShfrmSubAction.getShfrmSubAction().getId()) - .get(0); + if (deliverablePriorityActionPhase != null && deliverablePriorityActionPhase.getId() != null) { + deliverableShfrmSubActionDelete = + deliverableShfrmSubActionDAO.findByPriorityActionPhaseAndSubAction(deliverablePriorityActionPhase.getId(), + phase.getId(), deliverableShfrmSubAction.getShfrmSubAction().getId()).get(0); + } if (deliverableShfrmSubActionDelete != null) { deliverableShfrmSubActionDAO.deleteDeliverableShfrmSubAction(deliverableShfrmSubActionDelete.getId()); } @@ -106,6 +113,27 @@ public List findByPriorityActionPhaseAndSubAction(lon shfrmSubActionId); } + public DeliverableShfrmPriorityAction findDeliverablePriorityActionByDeliverablePriorityActionAndPhase( + DeliverableShfrmSubAction deliverableShfrmSubAction, Phase phase) { + DeliverableShfrmPriorityAction deliverableshfrmPriorityActionPhase = null; + try { + if (phase != null && phase.getId() != null && deliverableShfrmSubAction != null + && deliverableShfrmSubAction.getDeliverableShfrmPriorityAction() != null + && deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getShfrmPriorityAction() != null + && deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getShfrmPriorityAction().getId() != null + && deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getDeliverable() != null + && deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getDeliverable().getId() != null) { + deliverableshfrmPriorityActionPhase = deliverableShfrmPriorityActionDAO.findByDeliverablePriorityActionAndPhase( + deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getDeliverable().getId(), + deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getShfrmPriorityAction().getId(), phase.getId()) + .get(0); + } + } catch (Exception e) { + logger.error("error getting deliverableShfrmPriorityActionPhase in subActionsavePhase: " + e); + } + return deliverableshfrmPriorityActionPhase; + } + @Override public DeliverableShfrmSubAction getDeliverableShfrmSubActionById(long deliverableShfrmSubActionID) { @@ -129,31 +157,43 @@ public DeliverableShfrmSubAction saveDeliverableShfrmSubAction(DeliverableShfrmS public void saveDeliverableShfrmSubActionPhase(Phase next, DeliverableShfrmSubAction deliverableShfrmSubAction) { Phase phase = phaseDAO.find(next.getId()); DeliverableShfrmSubAction deliverableShfrmSubActionPhase = new DeliverableShfrmSubAction(); + + + // get priority action + DeliverableShfrmPriorityAction deliverableShfrmPriorityActionPhase = null; try { - deliverableShfrmSubActionPhase = deliverableShfrmSubActionDAO - .findByPriorityActionPhaseAndSubAction(deliverableShfrmSubAction.getDeliverableShfrmPriorityAction().getId(), - phase.getId(), deliverableShfrmSubAction.getShfrmSubAction().getId()) - .get(0); + deliverableShfrmPriorityActionPhase = + this.findDeliverablePriorityActionByDeliverablePriorityActionAndPhase(deliverableShfrmSubAction, phase); } catch (Exception e) { - logger.error("error getting deliverableShfrmSubActionPhase: " + e); + logger.error("error getting deliverable priority action " + e); } - if (deliverableShfrmSubActionPhase != null) { - DeliverableShfrmSubAction deliverableShfrmSubActionAdd = deliverableShfrmSubActionPhase; - deliverableShfrmSubActionAdd.setPhase(phase); - deliverableShfrmSubActionAdd.setShfrmSubAction(deliverableShfrmSubAction.getShfrmSubAction()); - deliverableShfrmSubActionAdd - .setDeliverableShfrmPriorityAction(deliverableShfrmSubAction.getDeliverableShfrmPriorityAction()); - deliverableShfrmSubActionDAO.save(deliverableShfrmSubActionAdd); - } else { - DeliverableShfrmSubAction deliverableShfrmSubActionAdd = new DeliverableShfrmSubAction(); - deliverableShfrmSubActionAdd.setPhase(phase); - deliverableShfrmSubActionAdd.setShfrmSubAction(deliverableShfrmSubAction.getShfrmSubAction()); - deliverableShfrmSubActionAdd - .setDeliverableShfrmPriorityAction(deliverableShfrmSubAction.getDeliverableShfrmPriorityAction()); - deliverableShfrmSubActionDAO.save(deliverableShfrmSubActionAdd); + try { + if (deliverableShfrmPriorityActionPhase != null && deliverableShfrmPriorityActionPhase.getId() != null) { + deliverableShfrmSubActionPhase = deliverableShfrmSubActionDAO + .findByPriorityActionPhaseAndSubAction(deliverableShfrmPriorityActionPhase.getId(), phase.getId(), + deliverableShfrmSubAction.getShfrmSubAction().getId()) + .get(0); + } + } catch (Exception e) { + logger.error("error getting deliverableShfrmSubActionPhase: " + e); } + if (deliverableShfrmPriorityActionPhase != null) { + if (deliverableShfrmSubActionPhase != null) { + DeliverableShfrmSubAction deliverableShfrmSubActionAdd = deliverableShfrmSubActionPhase; + deliverableShfrmSubActionAdd.setPhase(phase); + deliverableShfrmSubActionAdd.setShfrmSubAction(deliverableShfrmSubAction.getShfrmSubAction()); + deliverableShfrmSubActionAdd.setDeliverableShfrmPriorityAction(deliverableShfrmPriorityActionPhase); + deliverableShfrmSubActionDAO.save(deliverableShfrmSubActionAdd); + } else { + DeliverableShfrmSubAction deliverableShfrmSubActionAdd = new DeliverableShfrmSubAction(); + deliverableShfrmSubActionAdd.setPhase(phase); + deliverableShfrmSubActionAdd.setShfrmSubAction(deliverableShfrmSubAction.getShfrmSubAction()); + deliverableShfrmSubActionAdd.setDeliverableShfrmPriorityAction(deliverableShfrmPriorityActionPhase); + deliverableShfrmSubActionDAO.save(deliverableShfrmSubActionAdd); + } + } if (phase.getNext() != null) { this.saveDeliverableShfrmSubActionPhase(phase.getNext(), deliverableShfrmSubAction); } diff --git a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/DeliverableAction.java b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/DeliverableAction.java index cce06fd70a..431a8ea92f 100644 --- a/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/DeliverableAction.java +++ b/marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/projects/DeliverableAction.java @@ -314,7 +314,6 @@ public class DeliverableAction extends BaseAction { private String handle; private String disseminationURL; private String soilIndicatorsText; - private String previousContributionNarrative; private List focusLevels; // HJ 08/01/2019 new fileds Deliverable Partnerships @@ -687,23 +686,6 @@ public void fillClusterParticipantsList() { } } - public void fillPreviousContributionNarrative() { - try { - if (this.isReportingActive()) { - Phase previousPhase = phaseManager.findPreviousPhase(this.getActualPhase().getId()); - if (previousPhase != null) { - if (deliverable.getDeliverableInfo(previousPhase) != null - && deliverable.getDeliverableInfo(previousPhase).getShfrmContributionNarrative() != null) { - previousContributionNarrative = - deliverable.getDeliverableInfo(previousPhase).getShfrmContributionNarrative(); - } - } - } - } catch (Exception e) { - Log.error("error getting previous contribution narrative " + e); - } - } - public void fillSoilIndicatorsText() { try { soilIndicatorsText = null; @@ -1015,10 +997,6 @@ public long[] getPersonsIds(DeliverableUserPartnership deliverableUserPartnershi return EMPTY_ARRAY; } - public String getPreviousContributionNarrative() { - return previousContributionNarrative; - } - public List getProgramOutcomes() { return programOutcomes; } @@ -1261,6 +1239,43 @@ public boolean isPPA(Institution institution) { return false; } + public boolean isSoilIndicatorSelected() { + boolean containsIndicator = false; + + try { + if (deliverable.getCrpOutcomes() != null || !deliverable.getCrpOutcomes().isEmpty()) { + List soilIndicators = new ArrayList<>(); + soilIndicators = soilIndicatorManager.findAll(); + for (DeliverableCrpOutcome indicator : deliverable.getCrpOutcomes()) { + if (soilIndicators != null && !soilIndicators.isEmpty()) { + for (SoilIndicator soilIndicator : soilIndicators) { + if (indicator != null && indicator.getCrpProgramOutcome() != null + && indicator.getCrpProgramOutcome().getId() != null) { + try { + CrpProgramOutcome outcome = + crpProgramOutcomeManager.getCrpProgramOutcomeById(indicator.getCrpProgramOutcome().getId()); + if (outcome != null && outcome.getAcronym() != null) { + indicator.getCrpProgramOutcome().setAcronym(outcome.getAcronym()); + } + } catch (Exception e) { + Log.error("error getting crp program outcome " + e); + } + } + if (soilIndicator != null && soilIndicator.getIndicatorName() != null && indicator != null + && indicator.getCrpProgramOutcome() != null && indicator.getCrpProgramOutcome().getAcronym() != null + && indicator.getCrpProgramOutcome().getAcronym().contains(soilIndicator.getIndicatorName())) { + containsIndicator = true; + } + } + } + } + } + } catch (Exception e) { + Log.error("error validating soil indicator boolean " + e); + } + return containsIndicator; + } + @Override public void prepare() throws Exception { existCurrentCluster = false; @@ -1638,7 +1653,6 @@ public void prepare() throws Exception { } this.fillSoilIndicatorsText(); - this.fillPreviousContributionNarrative(); } // Expected Study Geographic Regions List @@ -4183,17 +4197,15 @@ public void saveSubActions() { } } else { // Delete all in DB - /* - * if (subPrev != null && !subPrev.isEmpty()) { - * for (DeliverableShfrmSubAction subAction : subPrev) { - * if (subAction != null && subAction.getId() != null) { - * if (!existingIds.contains(subAction.getId())) { - * deliverableShfrmSubActionManager.deleteDeliverableShfrmSubAction(subAction.getId()); - * } - * } - * } - * } - */ + + if (subPrev != null && !subPrev.isEmpty()) { + for (DeliverableShfrmSubAction subAction : subPrev) { + if (subAction != null && subAction.getId() != null) { + deliverableShfrmSubActionManager.deleteDeliverableShfrmSubAction(subAction.getId()); + } + } + } + } /***************/ @@ -4222,6 +4234,9 @@ public void saveSubActions() { // For new deliverable Priority Actions if (deliverableSubAction.getId() == null || deliverableSubAction.getId() == -1) { deliverableSubActionSave.setId(null); + if (deliverablePriorityAction.getDeliverable() == null) { + deliverablePriorityAction.setDeliverable(deliverable); + } deliverableSubActionSave.setDeliverableShfrmPriorityAction(deliverablePriorityAction); deliverableSubActionSave.setPhase(this.getActualPhase()); deliverableSubActionSave.setShfrmSubAction(subAction); @@ -4233,6 +4248,9 @@ public void saveSubActions() { deliverableSubActionSave = deliverableShfrmSubActionManager.getDeliverableShfrmSubActionById(deliverableSubAction.getId()); if (deliverableSubActionSave != null) { + if (deliverablePriorityAction.getDeliverable() == null) { + deliverablePriorityAction.setDeliverable(deliverable); + } deliverableSubActionSave.setDeliverableShfrmPriorityAction(deliverablePriorityAction); deliverableSubActionSave.setPhase(this.getActualPhase()); deliverableSubActionSave.setShfrmSubAction(subAction); @@ -4412,10 +4430,6 @@ public void setPartners(List partners) { this.partners = partners; } - public void setPreviousContributionNarrative(String previousContributionNarrative) { - this.previousContributionNarrative = previousContributionNarrative; - } - public void setProgramOutcomes(List programOutcomes) { this.programOutcomes = programOutcomes; } 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 ed129df736..1ff5a31930 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 @@ -567,7 +567,8 @@ public void validate(BaseAction action, Deliverable deliverable, boolean saving) } if (soilIndicator != null && soilIndicator.getIndicatorName() != null && indicator != null && indicator.getCrpProgramOutcome() != null && indicator.getCrpProgramOutcome().getAcronym() != null - && indicator.getCrpProgramOutcome().getAcronym().contains(soilIndicator.getIndicatorName())) { + && indicator.getCrpProgramOutcome().getAcronym().trim() + .contains(soilIndicator.getIndicatorName().trim())) { containsIndicator = true; } } @@ -583,14 +584,26 @@ public void validate(BaseAction action, Deliverable deliverable, boolean saving) } // Validate contribution narrative - if (!(this - .isValidString(deliverable.getDeliverableInfo(action.getActualPhase()).getShfrmContributionNarrative()) - && this.wordCount( - deliverable.getDeliverableInfo(action.getActualPhase()).getShfrmContributionNarrative()) <= 200)) { - action.addMessage(action.getText("deliverable.deliverableInfo.shfrmContributionNarrative")); - action.addMissingField("deliverable.deliverableInfo.shfrmContributionNarrative"); - action.getInvalidFields().put("input-deliverable.deliverableInfo.shfrmContributionNarrative", - InvalidFieldsMessages.EMPTYFIELD); + if (action.isReportingActive()) { + if (!(this + .isValidString(deliverable.getDeliverableInfo(action.getActualPhase()).getShfrmContributionNarrativeAR()) + && this.wordCount( + deliverable.getDeliverableInfo(action.getActualPhase()).getShfrmContributionNarrativeAR()) <= 200)) { + action.addMessage(action.getText("deliverable.deliverableInfo.shfrmContributionNarrativeAR")); + action.addMissingField("deliverable.deliverableInfo.shfrmContributionNarrativeAR"); + action.getInvalidFields().put("input-deliverable.deliverableInfo.shfrmContributionNarrativeAR", + InvalidFieldsMessages.EMPTYFIELD); + } + } else { + if (!(this + .isValidString(deliverable.getDeliverableInfo(action.getActualPhase()).getShfrmContributionNarrative()) + && this.wordCount( + deliverable.getDeliverableInfo(action.getActualPhase()).getShfrmContributionNarrative()) <= 200)) { + action.addMessage(action.getText("deliverable.deliverableInfo.shfrmContributionNarrative")); + action.addMissingField("deliverable.deliverableInfo.shfrmContributionNarrative"); + action.getInvalidFields().put("input-deliverable.deliverableInfo.shfrmContributionNarrative", + InvalidFieldsMessages.EMPTYFIELD); + } } // Validate priority actions @@ -601,26 +614,24 @@ public void validate(BaseAction action, Deliverable deliverable, boolean saving) action.getInvalidFields().put("list-deliverable.shfrmPriorityActions", InvalidFieldsMessages.EMPTYFIELD); } else if (deliverable.getShfrmPriorityActions() != null && !deliverable.getShfrmPriorityActions().isEmpty()) { - int indexJ = 0; + int indexI = 0; for (DeliverableShfrmPriorityAction priorityAction : deliverable.getShfrmPriorityActions()) { if (priorityAction != null && priorityAction.getShfrmSubActions() == null || (priorityAction != null && priorityAction.getShfrmSubActions() != null && priorityAction.getShfrmSubActions().isEmpty())) { action.addMessage(action.getText("deliverable.shfrmSubActions")); - action.addMissingField("deliverable.shfrmPriorityActions"); + action.addMissingField("deliverable.shfrmSubActions"); action.getInvalidFields().put("list-deliverable.shfrmPriorityActions", InvalidFieldsMessages.EMPTYFIELD); - - action.getInvalidFields().put( - "list-deliverable.shfrmPriorityActions[" + indexJ + "].shfrmSubActions[-1]", + action.getInvalidFields().put("list-deliverable.shfrmPriorityActions", InvalidFieldsMessages.EMPTYFIELD); /* - * action.addMessage(action.getText("deliverable.shfrmSubActions[" + indexJ + "]")); - * action.addMissingField("deliverable.shfrmSubActions[" + indexJ + "]"); - * action.getInvalidFields().put("list-deliverable.shfrmPriorityAction[" + indexJ + "].shfrmSubActions", + * action.addMessage(action.getText("deliverable.shfrmSubActions[" + indexI + "]")); + * action.addMissingField("deliverable.shfrmSubActions[" + indexI + "]"); + * action.getInvalidFields().put("list-deliverable.shfrmPriorityAction[" + indexI + "].shfrmSubActions", * InvalidFieldsMessages.EMPTYFIELD); */ - indexJ++; + indexI++; } } } diff --git a/marlo-web/src/main/webapp/WEB-INF/global/macros/deliverableMacros.ftl b/marlo-web/src/main/webapp/WEB-INF/global/macros/deliverableMacros.ftl index 1dae9b5bec..54b052e100 100644 --- a/marlo-web/src/main/webapp/WEB-INF/global/macros/deliverableMacros.ftl +++ b/marlo-web/src/main/webapp/WEB-INF/global/macros/deliverableMacros.ftl @@ -1530,13 +1530,13 @@ [#-- Shfrm Contribution Narrative --] [#if reportingActive] [#-- Previous narrative --] - [#if previousContribionNarrative?has_content] + [#if deliverable.deliverableInfo.shfrmContributionNarrative?has_content]
[@customForm.textArea name="deliverable.deliverableInfo.shfrmContributionNarrative" value="${(deliverable.deliverableInfo.shfrmContributionNarrative)!}" i18nkey="deliverable.shfrmContribution.narrative.reporting" placeholder="" className="limitWords-200" required=false editable=false /]
[/#if]
- [@customForm.textArea name="deliverable.deliverableInfo.shfrmContributionNarrative" value="${(deliverable.deliverableInfo.shfrmContributionNarrative)!}" i18nkey="deliverable.shfrmContribution.narrative.reporting" placeholder="" className="limitWords-200" required=true editable=editable /] + [@customForm.textArea name="deliverable.deliverableInfo.shfrmContributionNarrativeAR" value="${(deliverable.deliverableInfo.shfrmContributionNarrativeAR)!}" i18nkey="deliverable.shfrmContribution.narrative.reporting" placeholder="" className="limitWords-200" required=true editable=editable /]
[#else]