Skip to content
Snippets Groups Projects
Commit 1e1e4ea4 authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong:
Browse files

Merge branch '2021.1.0' into '2021.1'

2021.1.0

See merge request xrm/basic!937
parents 34778f61 3cb05ecc
No related branches found
No related tags found
No related merge requests found
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<include relativeToChangelogFile="true" file="struct/create_asys_audit.xml"/>
<include relativeToChangelogFile="true" file="struct/create_asys_aliasconfig.xml"/>
<include relativeToChangelogFile="true" file="struct/create_asys_binaries.xml"/>
<include relativeToChangelogFile="true" file="struct/create_asys_dashletconfigurations.xml"/>
......@@ -29,5 +31,6 @@
<include relativeToChangelogFile="true" file="data/insert_asys_system.xml"/>
<include relativeToChangelogFile="true" file="data/insert_asys_permissionset.xml"/>
<include relativeToChangelogFile="true" file="data/insert_asys_permission.xml"/>
<include relativeToChangelogFile="true" file="data/insert_asys_permissionaction.xml"/>
<include relativeToChangelogFile="true" file="data/insert_asys_permissionaction.xml"/>
</databaseChangeLog>
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="m.schloder" id="Xcb1ff99-55bd-4ebc-8137-ec05b4cacbd7">
<createTable tableName="ASYS_AUDIT">
<column name="ACOLUMNNAME" type="VARCHAR(217)"/>
<column name="ALIAS" type="VARCHAR(255)"/>
<column name="ATABLENAME" type="VARCHAR(127)"/>
<column name="ATIMESTAMP" type="DATETIME"/>
<column name="AUSER" type="VARCHAR(255)"/>
<column name="DATASETID" type="VARCHAR(1023)"/>
<column name="DATASETNEWVALUE_BLOB" type="LONGBLOB"/>
<column name="DATASETNEWVALUE_CLOB" type="TEXT"/>
<column name="DATASETNEWVALUE_STRING" type="VARCHAR(1023)"/>
<column defaultValueComputed="CURRENT_TIMESTAMP" name="LOGTIME" type="TIMESTAMP" />
<column name="LOGTYPE" type="INT"/>
<column name="LOGWRITERUID" type="VARCHAR(127)"/>
<column name="SQLACTION" type="CHAR(1)"/>
</createTable>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -41,15 +41,19 @@ EmailWritingUtils.openMailTemplate = function (pToRecipients, pSenderContactId,
if (pToRecipients && typeof(pToRecipients) == "string")
pToRecipients = [pToRecipients];
var email;
var email, retVal, isBinaryExistent;
isBinaryExistent = db.getBinaryCount("DOCUMENTTEMPLATE", "DOCUMENT", pTemplateId, SqlUtils.getBinariesAlias(), null);
if (pTemplateId || (pBindata.bindata != "" && pBindata.bindata != null))
if ((pTemplateId && isBinaryExistent > 0) || (pBindata.bindata != "" && pBindata.bindata != null))
{
email = Email.fromTemplate(pTemplateId, pRecipientContactId, pBindata, pAdditionalPlaceholders);
if (!email)
email = new Email();
}
else email = new Email();
else
{
email = new Email();
}
email.setSender(pSenderContactId);
......@@ -72,9 +76,7 @@ EmailWritingUtils.openMailTemplate = function (pToRecipients, pSenderContactId,
email.subject = pSubject;
}
var isBinaryExistent = db.getBinaryCount("DOCUMENTTEMPLATE", "DOCUMENT", pTemplateId, SqlUtils.getBinariesAlias(), null);
return isBinaryExistent > 0 ? email.downloadEML(pEmailFilename) : [];
return email.downloadEML(pEmailFilename);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment