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 a46fc66a06..350a513f78 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 @@ -71,14 +71,19 @@ public void deleteDeliverableShfrmPriorityActionPhase(Phase next, long deliverab Phase phase = phaseDAO.find(next.getId()); DeliverableShfrmPriorityAction deliverableShfrmPriorityActionDelete = new DeliverableShfrmPriorityAction(); - deliverableShfrmPriorityActionDelete = - deliverableShfrmPriorityActionDAO.findByDeliverableAndPhase(deliverableId, phase.getId()).stream() + + try { + deliverableShfrmPriorityActionDelete = deliverableShfrmPriorityActionDAO + .findByDeliverableAndPhase(deliverableId, phase.getId()).stream() .filter(d -> d != null && deliverableShfrmPriorityAction != null && deliverableShfrmPriorityAction.getShfrmPriorityAction() != null && deliverableShfrmPriorityAction.getShfrmPriorityAction().getId() != null && d.getShfrmPriorityAction() != null && d.getShfrmPriorityAction().getId() != null && d.getShfrmPriorityAction().getId().equals(deliverableShfrmPriorityAction.getShfrmPriorityAction().getId())) .collect(Collectors.toList()).get(0); + } catch (Exception e) { + logger.info("No priority actions " + e); + } if (deliverableShfrmPriorityActionDelete != null) { deliverableShfrmPriorityActionDAO @@ -157,18 +162,24 @@ public void saveDeliverableShfrmPriorityActionPhase(Phase next, long deliverable logger.error("error getting deliverableShfrmPriorityActionPhase: " + e); } - if (deliverableShfrmPriorityActionPhase != null) { - DeliverableShfrmPriorityAction deliverableShfrmPriorityActionAdd = deliverableShfrmPriorityActionPhase; - deliverableShfrmPriorityActionAdd.setDeliverable(deliverableShfrmPriorityAction.getDeliverable()); - deliverableShfrmPriorityActionAdd.setPhase(phase); - deliverableShfrmPriorityActionAdd.setShfrmPriorityAction(deliverableShfrmPriorityAction.getShfrmPriorityAction()); - deliverableShfrmPriorityActionDAO.save(deliverableShfrmPriorityActionAdd); - } else { - DeliverableShfrmPriorityAction deliverableShfrmPriorityActionAdd = new DeliverableShfrmPriorityAction(); - deliverableShfrmPriorityActionAdd.setDeliverable(deliverableShfrmPriorityAction.getDeliverable()); - deliverableShfrmPriorityActionAdd.setPhase(phase); - deliverableShfrmPriorityActionAdd.setShfrmPriorityAction(deliverableShfrmPriorityAction.getShfrmPriorityAction()); - deliverableShfrmPriorityActionDAO.save(deliverableShfrmPriorityActionAdd); + try { + if (deliverableShfrmPriorityActionPhase != null) { + DeliverableShfrmPriorityAction deliverableShfrmPriorityActionAdd = deliverableShfrmPriorityActionPhase; + deliverableShfrmPriorityActionAdd.setDeliverable(deliverableShfrmPriorityAction.getDeliverable()); + deliverableShfrmPriorityActionAdd.setPhase(phase); + deliverableShfrmPriorityActionAdd + .setShfrmPriorityAction(deliverableShfrmPriorityAction.getShfrmPriorityAction()); + deliverableShfrmPriorityActionDAO.save(deliverableShfrmPriorityActionAdd); + } else { + DeliverableShfrmPriorityAction deliverableShfrmPriorityActionAdd = new DeliverableShfrmPriorityAction(); + deliverableShfrmPriorityActionAdd.setDeliverable(deliverableShfrmPriorityAction.getDeliverable()); + deliverableShfrmPriorityActionAdd.setPhase(phase); + deliverableShfrmPriorityActionAdd + .setShfrmPriorityAction(deliverableShfrmPriorityAction.getShfrmPriorityAction()); + deliverableShfrmPriorityActionDAO.save(deliverableShfrmPriorityActionAdd); + } + } catch (Exception e) { + logger.error("error saving replication in DeliverableShfrmPriorityActionManagerImpl " + e); } if (phase.getNext() != null) { this.saveDeliverableShfrmPriorityActionPhase(phase.getNext(), deliverableId, deliverableShfrmPriorityAction); diff --git a/marlo-web/src/main/resources/custom/aicrra.properties b/marlo-web/src/main/resources/custom/aicrra.properties index 6bb53b5e09..d919c36e08 100644 --- a/marlo-web/src/main/resources/custom/aicrra.properties +++ b/marlo-web/src/main/resources/custom/aicrra.properties @@ -948,7 +948,7 @@ deliverable.shfrmContribution.question.help=If you select yes, please make sure deliverable.shfrmContribution.narrative.reporting=Provide a short narrative on the contribution of this deliverable to the SHFRM deliverable.shfrmContribution.narrative.planning=Provide a short narrative on the expected contribution of this deliverable to the SHFRM deliverable.shfrmContribution.priorityAction=To which priority action of the SHFRM is this deliverable contributing to? -deliverable.shfrmContribution.priorityAction.help=Select a priority action +deliverable.shfrmContribution.priorityAction.help=Select a priority action and sub-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): @@ -2703,7 +2703,7 @@ project.deliverable.generalInformation.year=Year of expected completion project.deliverable.generalInformation.justification=Status justification project.deliverable.generalInformation.outcome=Outcome project.deliverable.generalInformation.keyOutput=Performance Indicators -project.deliverable.generalInformation.keyOutput.help=If you select yes in SHFRM question, please make sure to select the SHFRM indicator +project.deliverable.generalInformation.keyOutput.help=If you select yes in SHFRM question, please make sure to select at least one SHFRM indicator project.deliverable.generalInformation.keyOutputNotice=If the indicator you are looking for is not listed, please ensure the indicator is mapped to this cluster by clicking here project.deliverable.generalInformation.keyOutputNotList1=Remember that you must to add cluster of activities project.deliverable.generalInformation.keyOutputNotList2=, then you will be able to select key outputs. diff --git a/marlo-web/src/main/resources/global.properties b/marlo-web/src/main/resources/global.properties index 1235f2c069..f5a3982dfe 100644 --- a/marlo-web/src/main/resources/global.properties +++ b/marlo-web/src/main/resources/global.properties @@ -949,7 +949,7 @@ deliverable.shfrmContribution.question.help=If you select yes, please make sure deliverable.shfrmContribution.narrative.reporting=Provide a short narrative on the contribution of this deliverable the SHFRM deliverable.shfrmContribution.narrative.planing=Provide a short narrative on the expected contribution of this deliverable the SHFRM deliverable.shfrmContribution.priorityAction=To which priority action of the SHFRM is this deliverable contributing to? -deliverable.shfrmContribution.priorityAction.help=Select a priority action +deliverable.shfrmContribution.priorityAction.help=Select a priority action and sub-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): @@ -2785,7 +2785,7 @@ project.deliverable.generalInformation.year=Year of expected completion project.deliverable.generalInformation.justification=Status justification project.deliverable.generalInformation.outcome=Outcome project.deliverable.generalInformation.keyOutput=Key Output -project.deliverable.generalInformation.keyOutput.help=If you select yes in SHFRM question, please make sure to select the SHFRM indicator +project.deliverable.generalInformation.keyOutput.help=If you select yes in SHFRM question, please make sure to select at least one SHFRM indicator project.deliverable.generalInformation.keyOutputNotice=Click here to add or edit the list of contribution to performance indicators project.deliverable.generalInformation.keyOutputNotList1=Remember that you must to add cluster of activities project.deliverable.generalInformation.keyOutputNotList2=, then you will be able to select key outputs. 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 54b052e100..b3d8fb0592 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 @@ -1581,7 +1581,7 @@ [#-- --] - ${(subActionItem.shfrmSubAction.name)!'null'} + ${(subActionItem.shfrmSubAction.composedName)!'null'}
[/#macro]