commit
0094d6bcf2
5 changed files with 48 additions and 38 deletions
|
|
@ -1,28 +1,54 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
|
||||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
|
||||
|
||||
|
||||
<changeSet id="adding-email_template_table" author="vova/jeroen">
|
||||
<createTable tableName="email_template">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false" primaryKeyName="email_templates_pkey"/>
|
||||
</column>
|
||||
<column name="type" type="int"/>
|
||||
<column name="language" type="int"/>
|
||||
<column name="content" type="varchar(2048)"/>
|
||||
<column name="subject" type="varchar(1024)"/>
|
||||
</createTable>
|
||||
<addUniqueConstraint
|
||||
constraintName="email_template_type_lang_key"
|
||||
columnNames="type,language"
|
||||
deferrable="false"
|
||||
disabled="false"
|
||||
initiallyDeferred="false"
|
||||
tableName="email_template"
|
||||
/>
|
||||
|
||||
<addUniqueConstraint
|
||||
constraintName="email_template_type_language"
|
||||
columnNames="type, language"
|
||||
deferrable="false"
|
||||
disabled="false"
|
||||
initiallyDeferred="false"
|
||||
tableName="email_template"
|
||||
/>
|
||||
<createIndex tableName="email_template" indexName="language_index">
|
||||
<column name="language"></column>
|
||||
</createIndex>
|
||||
<createIndex tableName="email_template" indexName="type_index">
|
||||
<column name="type"></column>
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
<changeSet id="adding-notification_notification_queue" author="vova">
|
||||
<createTable tableName="notification_queue">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false" primaryKeyName="notification_queue_pkey"/>
|
||||
</column>
|
||||
<column name="type" type="int"/>
|
||||
<column name="updated" type="timestamp with time zone"/>
|
||||
<column name="resource" type="BIGINT"/>
|
||||
<column name="task" type="BIGINT"/>
|
||||
<column name="project" type="BIGINT"/>
|
||||
</createTable>
|
||||
<addUniqueConstraint
|
||||
tableName="notification_queue"
|
||||
columnNames="resource, task, project"
|
||||
deferrable="false"
|
||||
disabled="false"
|
||||
initiallyDeferred="false"/>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
|
@ -40,6 +40,9 @@
|
|||
<value>
|
||||
org/libreplan/business/orders/entities/Orders.hbm.xml
|
||||
</value>
|
||||
<value>
|
||||
org/libreplan/business/templates/entities/Templates.hbm.xml
|
||||
</value>
|
||||
<value>
|
||||
org/libreplan/business/planner/entities/Tasks.hbm.xml
|
||||
</value>
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@
|
|||
<value>
|
||||
org/libreplan/business/orders/entities/Orders.hbm.xml
|
||||
</value>
|
||||
<value>
|
||||
org/libreplan/business/templates/entities/Templates.hbm.xml
|
||||
</value>
|
||||
<value>
|
||||
org/libreplan/business/planner/entities/Tasks.hbm.xml
|
||||
</value>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue