commit
0094d6bcf2
5 changed files with 48 additions and 38 deletions
|
|
@ -1,28 +1,54 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
|
||||||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
|
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
|
||||||
|
|
||||||
|
|
||||||
<changeSet id="adding-email_template_table" author="vova/jeroen">
|
<changeSet id="adding-email_template_table" author="vova/jeroen">
|
||||||
<createTable tableName="email_template">
|
<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"/>
|
<constraints primaryKey="true" nullable="false" primaryKeyName="email_templates_pkey"/>
|
||||||
</column>
|
</column>
|
||||||
<column name="type" type="int"/>
|
<column name="type" type="int"/>
|
||||||
<column name="language" type="int"/>
|
<column name="language" type="int"/>
|
||||||
<column name="content" type="varchar(2048)"/>
|
<column name="content" type="varchar(2048)"/>
|
||||||
|
<column name="subject" type="varchar(1024)"/>
|
||||||
</createTable>
|
</createTable>
|
||||||
<addUniqueConstraint
|
|
||||||
constraintName="email_template_type_lang_key"
|
<addUniqueConstraint
|
||||||
columnNames="type,language"
|
constraintName="email_template_type_language"
|
||||||
deferrable="false"
|
columnNames="type, language"
|
||||||
disabled="false"
|
deferrable="false"
|
||||||
initiallyDeferred="false"
|
disabled="false"
|
||||||
tableName="email_template"
|
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>
|
</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>
|
<value>
|
||||||
org/libreplan/business/orders/entities/Orders.hbm.xml
|
org/libreplan/business/orders/entities/Orders.hbm.xml
|
||||||
</value>
|
</value>
|
||||||
|
<value>
|
||||||
|
org/libreplan/business/templates/entities/Templates.hbm.xml
|
||||||
|
</value>
|
||||||
<value>
|
<value>
|
||||||
org/libreplan/business/planner/entities/Tasks.hbm.xml
|
org/libreplan/business/planner/entities/Tasks.hbm.xml
|
||||||
</value>
|
</value>
|
||||||
|
|
|
||||||
|
|
@ -231,34 +231,12 @@ public class DashboardControllerGlobal extends GenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove time, timezone from full-date string
|
||||||
private String getOrderInitDate(Order order) throws ParseException {
|
private String getOrderInitDate(Order order) throws ParseException {
|
||||||
// Remove time, timezone from full-date string
|
return new SimpleDateFormat("EEE MMM dd yyyy").format(order.getInitDate());
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getOrderDeadline(Order order) throws ParseException {
|
private String getOrderDeadline(Order order) throws ParseException {
|
||||||
// Remove time, timezone from full-date string
|
return new SimpleDateFormat("EEE MMM dd yyyy").format(order.getDeadline());
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showStoredColumn() throws ParseException {
|
public void showStoredColumn() throws ParseException {
|
||||||
|
|
|
||||||
|
|
@ -732,7 +732,7 @@ public class TaskPropertiesController extends GenericForwardComposer {
|
||||||
|
|
||||||
private void EmailNotificationAddNewWithTaskAssignedToResource(){
|
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
|
/* 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
|
* setUser method calling manually because, after initialization user will be null
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,9 @@
|
||||||
<value>
|
<value>
|
||||||
org/libreplan/business/orders/entities/Orders.hbm.xml
|
org/libreplan/business/orders/entities/Orders.hbm.xml
|
||||||
</value>
|
</value>
|
||||||
|
<value>
|
||||||
|
org/libreplan/business/templates/entities/Templates.hbm.xml
|
||||||
|
</value>
|
||||||
<value>
|
<value>
|
||||||
org/libreplan/business/planner/entities/Tasks.hbm.xml
|
org/libreplan/business/planner/entities/Tasks.hbm.xml
|
||||||
</value>
|
</value>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue