Skip to content
Snippets Groups Projects
Commit 65e4a4c1 authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

Blacklist bugfixes

parent 661b9bd2
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,14 @@
</entityParameter>
</children>
</entityConsumer>
<entityField>
<name>DATE_NEW</name>
<valueProcess>%aditoprj%/entity/CommunicationBlacklist_entity/entityfields/date_new/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>USER_NEW</name>
<valueProcess>%aditoprj%/entity/CommunicationBlacklist_entity/entityfields/user_new/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -95,6 +103,18 @@
<recordfield>COMMUNICATIONBLACKLIST.START_DATE</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>USER_NEW.value</name>
<recordfield>COMMUNICATIONBLACKLIST.USER_NEW</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>DATE_NEW.value</name>
<recordfield>COMMUNICATIONBLACKLIST.DATE_NEW</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>BLACKLIST_TYPE.displayValue</name>
<expression>%aditoprj%/entity/CommunicationBlacklist_entity/recordcontainers/db/recordfieldmappings/blacklist_type.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
</recordFieldMappings>
<linkInformation>
<linkInformation>
......
import("system.result");
import("system.neon");
import("system.vars");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
result.string(vars.get("$sys.date"));
\ No newline at end of file
import("system.result");
import("system.neon");
import("system.vars");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
result.string(vars.get("$sys.user"));
\ No newline at end of file
import("KeywordRegistry_basic");
import("system.result");
import("Keyword_lib");
result.string(KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.communicationBlacklistType(), "COMMUNICATIONBLACKLIST.BLACKLIST_TYPE"));
\ No newline at end of file
......@@ -47,6 +47,10 @@
<key>discounted Vat</key>
<value>Rbt. Mehrwertssteuer</value>
</entry>
<entry>
<key>Filter can't be empty</key>
<value>Filter darf nicht leer sein</value>
</entry>
<entry>
<key>Illegal Parent Operator in buildFilterObj-Function:</key>
<value>Übergebener Operator ungültig in Funktion "buildFilterObj"</value>
......@@ -83,6 +87,10 @@
<key>descending</key>
<value>absteigend</value>
</entry>
<entry>
<key>Recipient filter</key>
<value>Empfänger Filter</value>
</entry>
<entry>
<key>Salesproject phases</key>
<value>Vertriebsprojektphasen</value>
......
......@@ -194,7 +194,7 @@ CommunicationBlacklist.getMailRecipientBlacklist = function ()
return blacklist;
}
CommunicationBlacklistCondition.prototype.buildCondition = function ()
CommunicationBlacklist.prototype.buildCondition = function ()
{
return new FilterSqlTranslator()
.filter(this.filter)
......
import("system.util");
import("Sql_lib");
import("KeywordRegistry_basic");
import("system.vars");
......@@ -5,4 +7,37 @@ var variables = JSON.parse(vars.get("$local.value"));
var contactId = variables.contactId || variables.targetId;
var channelType = variables.channelType;
var channelId = variables.channelId;
var status = variables.status || $KeywordRegistry.communicationSettingStatus$rejected();
\ No newline at end of file
var status = variables.status || $KeywordRegistry.communicationSettingStatus$rejected();
var settingsId = newSelect("COMMUNICATIONSETTINGSID")
.from("COMMUNICATIONSETTINGS")
.where("COMMUNICATIONSETTINGS.CONTACT_ID", contactId)
.and("COMMUNICATIONSETTINGS.CHANNEL_TYPE", channelType)
.and("COMMUNICATIONSETTINGS.CHANNEL_ID", channelId)
.cell();
if (settingsId)
{
newWhere("COMMUNICATIONSETTINGS.COMMUNICATIONSETTINGSID")
.updateFields({"STATUS": status});
}
else
{
settingsId = util.getNewUUID();
new SqlBuilder()
.tableName("COMMUNICATIONSETTINGS")
.insertFields({
"COMMUNICATIONSETTINGSID": settingsId,
"CHANNEL_TYPE": channelType,
"CHANNEL_ID": channelId,
"MEDIUM": medium,
"STATUS": status
});
new SqlBuilder()
.tableName("COMMUNICATIONLEGALBASE")
.insertFields({
"COMMUNICATIONLEGALBASEID": util.getNewUUID(),
"COMMUNICATIONSETTINGS_ID": settingsId,
"VERSION": 1
});
}
\ No newline at end of file
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