diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index 129f13c5f9793726fea84b96ca0ecc860452bbdc..076a79281415b2ccded347826231ef5b5153a596 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -2938,7 +2938,7 @@ <description></description> <auditSyncConfig> <name>auditSyncConfig</name> - <auditMode v="0" /> + <auditMode v="1" /> <syncActive v="false" /> <syncComplete v="true" /> <syncDirection v="1" /> @@ -4107,7 +4107,7 @@ <description></description> <auditSyncConfig> <name>auditSyncConfig</name> - <auditMode v="0" /> + <auditMode v="1" /> <syncActive v="false" /> <syncComplete v="true" /> <syncDirection v="1" /> diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index 47ee981a8d574ec0d618b02408487bfaff255ee5..e53558d7fd26c880553838d26afa4a5b952ce3a4 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -618,6 +618,7 @@ <name>LogHistoryConsumer</name> <title>LogHistory</title> <fieldType>DEPENDENCY_OUT</fieldType> + <state>READONLY</state> <dependency> <name>dependency</name> <entityName>LogHistory_entity</entityName> diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index c8e62e3e26ab9896424f940db8d80b60f18bad3a..8f574ea4f33b2e47193ccaf160b042518b7c9d00 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -717,6 +717,7 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <name>LogHistoryConsumer</name> <title>LogHistory</title> <fieldType>DEPENDENCY_OUT</fieldType> + <state>READONLY</state> <dependency> <name>dependency</name> <entityName>LogHistory_entity</entityName> diff --git a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod index 35430f5089fee2c2b0e5c87d3278c5f9d34a897c..7332493c3bfac72cba1d3819729a94abe19529b7 100644 --- a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod +++ b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod @@ -2,7 +2,7 @@ <preferences xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="3.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/preferences/3.1.0"> <name>_____PREFERENCES_PROJECT</name> <majorModelMode>DISTRIBUTED</majorModelMode> - <projectName>xRM-Basic5</projectName> + <projectName>xRM-Basic 2019</projectName> <jditoMaxContentSize v="57671680" /> <calendarCategoriesEvent> <entry> diff --git a/process/Loghistory_lib/process.js b/process/Loghistory_lib/process.js index a3079c490e28b519fc8c29f75b80cc9b4a233bd9..16ac3302969c4e317fe8cc44bd14a8c7b3900a7b 100644 --- a/process/Loghistory_lib/process.js +++ b/process/Loghistory_lib/process.js @@ -1,3 +1,4 @@ +import("system.logging"); import("system.project"); import("system.calendars"); import("system.db"); @@ -30,25 +31,27 @@ import("Util_lib"); function logHistory (pTable, pUser, pColumns, pNewValues, pOldValues, pTimeStamp, pAction, pIdValue) { var references = {}; - var columns = {}; - var toLog = false; + var coldef = {}; + var primaryKey = ""; + var tolog = false; pTable = pTable.toUpperCase(); pColumns = pColumns.map(function (v){ return v.toUpperCase(); }); - var Structure = project.getAliasDefinitionStructure("Data_alias", pTable); - if (Structure) + var structure = project.getAliasDefinitionStructure("Data_alias", pTable); + if (structure) { - columns = Structure.tables[pTable].columns; - for (var column in columns) + coldef = structure.tables[pTable].columns; + for (var column in coldef) { - if (columns[column].tableRef != null) references[column] = {table: columns[column].tableRef, id: ""}; - if (columns[column].primaryKey) primaryKey = column; - if (columns[column].log) toLog = columns[column].log; + if (coldef[column].tableRef) references[column] = {table: coldef[column].tableRef, id: ""}; + if (coldef[column].primaryKey) primaryKey = column; + if (coldef[column].log) tolog = coldef[column].log; } } + - if (toLog) + if (tolog) { var idvalue = pIdValue; var description = []; @@ -103,6 +106,7 @@ function logHistory (pTable, pUser, pColumns, pNewValues, pOldValues, pTimeStamp } //no extra tables else { + logging.log("no extra table"); if (pTable == "ASYS_CALENDARBACKEND") { var entrytypePosition = pColumns.indexOf("ENTRYTYPE"); if (entrytypePosition > -1) if (pNewValues[entrytypePosition] == calendars.VEVENT) return; @@ -155,46 +159,6 @@ function logHistory (pTable, pUser, pColumns, pNewValues, pOldValues, pTimeStamp } } -/* -* Creates an Array of AB_LOGHISTORY data for display in a view -* -* @param {String} pCondition req TableName -* -* @return {[]} table -*/ -function showLoghistory(pCondition) -{ - var loglist = db.createEmptyTable(3); - var data = db.table("select DATE_NEW, USER_NEW, DESCRIPTION from ASYS_LOGHISTORY where " + pCondition + " order by DATE_NEW desc"); - - if (data.length > 0) - { - loglist = []; - var groupdate = datetime.toDate(data[0][0], translate.text("dd.MM.yyyy HH:mm")); - var logdate = data[0][0]; - var loguser = data[0][1]; - var descripton = data[0][2]; - - for (var i = 1; i < data.length; i++) - { - if (groupdate + loguser == datetime.toDate(data[i][0], translate.text("dd.MM.yyyy HH:mm")) + data[i][1]) - { - if (descripton != data[i][2]) descripton = data[i][2] + "\n" + descripton; - } - else - { - loglist.push([logdate, loguser, descripton]); - groupdate = datetime.toDate(data[i][0], translate.text("dd.MM.yyyy HH:mm")); - logdate = data[i][0]; - loguser = data[i][1]; - descripton = data[i][2]; - } - } - loglist.push([logdate, loguser, descripton]); - } - return loglist; -} - /* * Creates the data for the tables with special cases * diff --git a/process/process_audit/process.js b/process/process_audit/process.js index 7dd2dd289bdaf5fd672c22104c2749f85e5dce55..12a132919376ad6a7965b8b1b4f5c76a20d1adb8 100644 --- a/process/process_audit/process.js +++ b/process/process_audit/process.js @@ -1,4 +1,5 @@ -import("Loghist_lib"); +import("system.logging"); +import("Loghistory_lib"); import("system.vars"); var tableName = vars.get("$local.table");