diff --git a/libreplan-business/src/test/resources/libreplan-business-spring-config-test.xml b/libreplan-business/src/test/resources/libreplan-business-spring-config-test.xml
index 32ad8eb9c..fa7a5ee8b 100644
--- a/libreplan-business/src/test/resources/libreplan-business-spring-config-test.xml
+++ b/libreplan-business/src/test/resources/libreplan-business-spring-config-test.xml
@@ -40,6 +40,9 @@
org/libreplan/business/orders/entities/Orders.hbm.xml
+
+ org/libreplan/business/templates/entities/Templates.hbm.xml
+
org/libreplan/business/planner/entities/Tasks.hbm.xml
diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardControllerGlobal.java b/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardControllerGlobal.java
index 71d9c793b..3c2230122 100644
--- a/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardControllerGlobal.java
+++ b/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardControllerGlobal.java
@@ -231,34 +231,12 @@ public class DashboardControllerGlobal extends GenericForwardComposer {
}
}
+ // Remove time, timezone from full-date string
private String getOrderInitDate(Order order) throws ParseException {
- // Remove time, timezone from full-date string
- DateFormat inputFormatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
- DateFormat outputFormatter = new SimpleDateFormat("EEE MMM dd yyyy");
- String input = "";
- String outputInit = "";
- String outputDeadline = "";
- Date date = null;
-
- input = order.getInitDate().toString();
- date = inputFormatter.parse(input);
-
- return outputInit = outputFormatter.format(date);
+ return new SimpleDateFormat("EEE MMM dd yyyy").format(order.getInitDate());
}
-
private String getOrderDeadline(Order order) throws ParseException {
- // Remove time, timezone from full-date string
- DateFormat inputFormatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
- DateFormat outputFormatter = new SimpleDateFormat("EEE MMM dd yyyy");
- String input = "";
- String outputInit = "";
- String outputDeadline = "";
- Date date = null;
-
- input = order.getDeadline().toString();
- date = inputFormatter.parse(input);
-
- return outputDeadline = outputFormatter.format(date);
+ return new SimpleDateFormat("EEE MMM dd yyyy").format(order.getDeadline());
}
public void showStoredColumn() throws ParseException {
diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/planner/taskedition/TaskPropertiesController.java b/libreplan-webapp/src/main/java/org/libreplan/web/planner/taskedition/TaskPropertiesController.java
index 4934390af..e6495d518 100644
--- a/libreplan-webapp/src/main/java/org/libreplan/web/planner/taskedition/TaskPropertiesController.java
+++ b/libreplan-webapp/src/main/java/org/libreplan/web/planner/taskedition/TaskPropertiesController.java
@@ -732,7 +732,7 @@ public class TaskPropertiesController extends GenericForwardComposer {
private void EmailNotificationAddNewWithTaskAssignedToResource(){
- if ( allocationResult != null ) {
+ if ( allocationResult.getSpecificAllocations().size() != 0 ) {
/* Check if resources in allocation are bound by user and are in role ROLE_EMAIL_TASK_ASSIGNED_TO_RESOURCE
* setUser method calling manually because, after initialization user will be null
diff --git a/libreplan-webapp/src/test/resources/libreplan-webapp-spring-config-test.xml b/libreplan-webapp/src/test/resources/libreplan-webapp-spring-config-test.xml
index 1dd57d780..5a41f4130 100644
--- a/libreplan-webapp/src/test/resources/libreplan-webapp-spring-config-test.xml
+++ b/libreplan-webapp/src/test/resources/libreplan-webapp-spring-config-test.xml
@@ -41,6 +41,9 @@
org/libreplan/business/orders/entities/Orders.hbm.xml
+
+ org/libreplan/business/templates/entities/Templates.hbm.xml
+
org/libreplan/business/planner/entities/Tasks.hbm.xml