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

Merge branch '1055398_integerAttributes' into '2021.0'

1055398 integer attributes

See merge request xrm/basic!746
parents 641dbfe6 591449f4
No related branches found
No related tags found
No related merge requests found
Showing
with 338 additions and 155 deletions
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<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 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="s.listl" id="4b3b9c3b-a0d3-4dbb-a6ab-69da2d9ae57a">
<addColumn tableName="AB_ATTRIBUTE">
<column name="VALIDATIONPARAMETERS" type="NVARCHAR(512)"/>
</addColumn>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<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 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<include relativeToChangelogFile="true" file="add_attributeValidationParams.xml"/>
<include relativeToChangelogFile="true" file="insert_attributeTypeInteger.xml"/>
</databaseChangeLog>
\ No newline at end of file
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<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 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="s.listl" id="f2942a4c-96e2-4a85-81f2-153fc3f77a6c">
<insert tableName="AB_KEYWORD_ENTRY">
<column name="AB_KEYWORD_ENTRYID" value="87c376e0-8a25-4a0e-913c-885ca7fe69cc"/>
<column name="KEYID" value="INTEGER"/>
<column name="TITLE" value="Integer"/>
<column name="CONTAINER" value="AttributeType"/>
<column name="AB_KEYWORD_CATEGORY_ID" value="ad91fa20-157b-4e57-b9ad-1281e40024b3"/>
<column name="SORTING" valueNumeric="12"/>
<column name="ISACTIVE" valueNumeric="1"/>
<column name="ISESSENTIAL" valueNumeric="1"/>
</insert>
<insert tableName="ab_keyword_attributerelation">
<column name="AB_KEYWORD_ENTRY_ID" value="87c376e0-8a25-4a0e-913c-885ca7fe69cc"/>
<column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="3e845022-cae2-4229-b199-1df03eee717e"/>
<column name="AB_KEYWORD_ATTRIBUTE_ID" value="307ecfc6-15c8-4ab9-8afa-e97b90a00c5f"/>
<column name="CHAR_VALUE" value="VAADIN:HASH"/>
</insert>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -5,4 +5,5 @@
<include relativeToChangelogFile="true" file="alter_CompetitionExpandReasonSize.xml"/>
<include relativeToChangelogFile="true" file="Checklists/changelog.xml"/>
<include relativeToChangelogFile="true" file="change_SalesprojectMemberRole.xml"/>
<include relativeToChangelogFile="true" file="AttributeInteger/changelog.xml"/>
</databaseChangeLog>
\ No newline at end of file
......@@ -6102,6 +6102,20 @@
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>VALIDATIONPARAMETERS</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="512" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......
......@@ -130,6 +130,7 @@
<stateProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/value/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/value/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/value/displayValueProcess.js</displayValueProcess>
<onValidation>%aditoprj%/entity/AttributeRelation_entity/entityfields/value/onValidation.js</onValidation>
</entityField>
<entityConsumer>
<name>SpecificAttribute</name>
......@@ -316,6 +317,7 @@
<mandatoryProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/value_lookup/mandatoryProcess.js</mandatoryProcess>
<stateProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/value_lookup/stateProcess.js</stateProcess>
<displayValueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/value_lookup/displayValueProcess.js</displayValueProcess>
<onValidation>%aditoprj%/entity/AttributeRelation_entity/entityfields/value_lookup/onValidation.js</onValidation>
</entityField>
<entityConsumer>
<name>Objects</name>
......@@ -389,6 +391,10 @@
</entityParameter>
</children>
</entityProvider>
<entityField>
<name>VALIDATIONPARAMETERS</name>
<valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/validationparameters/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......
import("system.neon");
import("system.vars");
import("system.result");
import("Sql_lib");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
{
result.string(newSelect("VALIDATIONPARAMETERS")
.from("AB_ATTRIBUTE")
.where("AB_ATTRIBUTE.AB_ATTRIBUTEID", "$field.AB_ATTRIBUTE_ID")
.cell());
}
\ No newline at end of file
import("Util_lib");
import("system.result");
import("system.vars");
import("Attribute_lib");
var attributeType = AttributeTypes.get(vars.get("$field.ATTRIBUTE_TYPE"));
if (attributeType && !attributeType.useLookup)
{
var validationResult = attributeType.validateValue(vars.get("$local.value"), Utils.parseJSON(vars.get("$field.VALIDATIONPARAMETERS")));
if (validationResult && validationResult !== true)
result.string(validationResult);
}
\ No newline at end of file
import("Util_lib");
import("system.result");
import("system.vars");
import("Attribute_lib");
var attributeType = AttributeTypes.get(vars.get("$field.ATTRIBUTE_TYPE"));
if (attributeType && attributeType.useLookup)
{
var validationResult = attributeType.validateValue(vars.get("$local.value"), Utils.parseJSON(vars.get("$field.VALIDATIONPARAMETERS")));
if (validationResult && validationResult !== true)
result.string(validationResult);
}
\ No newline at end of file
......@@ -497,6 +497,13 @@
</entityParameter>
</children>
</entityProvider>
<entityField>
<name>VALIDATIONPARAMETERS</name>
</entityField>
<entityField>
<name>VALIDATIONPARAMDEFINITION</name>
<valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/validationparamdefinition/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......@@ -514,45 +521,48 @@
<name>UID.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>ATTRIBUTE_PARENT_ID.value</name>
<name>ATTRIBUTE_NAME.value</name>
<isFilterable v="true" />
<isLookupFilter v="true" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>ATTRIBUTE_NAME.value</name>
<isFilterable v="true" />
<isLookupFilter v="true" />
<name>FULL_ATTRIBUTE_NAME.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>ATTRIBUTE_ACTIVE.value</name>
<name>ATTRIBUTE_PARENT_ID.value</name>
<isFilterable v="true" />
<isLookupFilter v="true" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>DROPDOWNDEFINITION.value</name>
<name>ATTRIBUTE_PARENT_ID.displayValue</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>DROPDOWNFILTER.value</name>
<name>ATTRIBUTE_TYPE.value</name>
<isFilterable v="true" />
<isLookupFilter v="true" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>SORTING.value</name>
<name>ATTRIBUTE_TYPE.displayValue</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>ATTRIBUTE_TYPE.value</name>
<name>ATTRIBUTE_ACTIVE.value</name>
<isFilterable v="true" />
<isLookupFilter v="true" />
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>ATTRIBUTE_TYPE.displayValue</name>
<name>SORTING.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>USAGELIST.value</name>
<name>DROPDOWNDEFINITION.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>ATTRIBUTE_PARENT_ID.displayValue</name>
<name>DROPDOWNFILTER.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>FULL_ATTRIBUTE_NAME.value</name>
<name>VALIDATIONPARAMETERS.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>USAGELIST.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>USAGE_FILTER.value</name>
......
import("system.translate");
import("Context_lib");
import("system.vars");
import("system.result");
import("Keyword_lib");
import("Attribute_lib");
var res = [];
var type = vars.get("$field.ATTRIBUTE_TYPE").trim();
var getDropDownFn = type && AttributeTypes[type] && AttributeTypes[type].getDropDownDefinitions;
if (getDropDownFn instanceof Function)
res = getDropDownFn.call();
result.object(res);
var attributeType = AttributeTypes.get(vars.get("$field.ATTRIBUTE_TYPE"));
if (attributeType)
{
result.object(attributeType.getDropDownDefinitions() || []);
}
else
{
result.object([]);
}
\ No newline at end of file
......@@ -3,4 +3,6 @@ import("system.vars");
import("system.result");
import("Attribute_lib");
result.string(translate.text(AttributeTypeUtil.getDropDownDefinitionTitle(vars.get("$field.ATTRIBUTE_TYPE"))));
\ No newline at end of file
var type = AttributeTypes.get(vars.get("$field.ATTRIBUTE_TYPE"));
var title = type ? type.dropDownDefinitionTitle : "";
result.string(translate.text(title));
\ No newline at end of file
......@@ -4,8 +4,8 @@ import("system.result");
import("Attribute_lib");
var fieldState = neon.COMPONENTSTATE_INVISIBLE;
var type = vars.get("$field.ATTRIBUTE_TYPE").trim();
if (type && AttributeTypes[type] && AttributeTypes[type].getDropDownDefinitions)
var type = AttributeTypes.get(vars.get("$field.ATTRIBUTE_TYPE"));
if (type && type.dropDownDefinitionTitle)
{
if (AttributeUtil.hasRelations(vars.get("$field.UID")))
fieldState = neon.COMPONENTSTATE_READONLY;
......
......@@ -3,4 +3,6 @@ import("system.vars");
import("system.result");
import("Attribute_lib");
result.string(translate.text(AttributeTypeUtil.getDropDownDefinitionTitle(vars.get("$field.ATTRIBUTE_TYPE"))));
\ No newline at end of file
var type = AttributeTypes.get(vars.get("$field.ATTRIBUTE_TYPE"));
var title = type ? type.dropDownDefinitionTitle : "";
result.string(translate.text(title));
\ No newline at end of file
......@@ -2,6 +2,6 @@ import("system.result");
import("system.vars");
import("Attribute_lib");
var type = vars.get("$field.ATTRIBUTE_TYPE").trim();
if (type && AttributeTypes[type] && typeof(AttributeTypes[type].getDropDownDefinitions) !== "function")
var type = AttributeTypes.get(vars.get("$field.ATTRIBUTE_TYPE"));
if (type && !type.getDropDownDefinitions())
result.string("");
\ No newline at end of file
import("system.neon");
import("Util_lib");
import("system.vars");
import("system.result");
import("Attribute_lib");
var recordstate = vars.get("$sys.recordstate");
if (recordstate == neon.OPERATINGSTATE_NEW || recordstate == neon.OPERATINGSTATE_EDIT)
{
var attributeType = AttributeTypes.get(vars.get("$field.ATTRIBUTE_TYPE"));
var validationParamDefinition = attributeType ? attributeType.getValidationParameters() : null;
if (recordstate == neon.OPERATINGSTATE_EDIT && !Utils.isNullOrEmpty(validationParamDefinition) && vars.get("$this.value") == null)
{
var parameterValues = Utils.parseJSON(vars.get("$field.VALIDATIONPARAMETERS")) || {};
validationParamDefinition.forEach(function (param)
{
if (param.id in parameterValues && param.value == null)
param.value = parameterValues[param.id];
});
}
result.string(validationParamDefinition ? JSON.stringify(validationParamDefinition) : "");
}
\ No newline at end of file
......@@ -14,8 +14,8 @@ var childId = vars.get("$param.ChildId_param");
var childType = vars.get("$param.ChildType_param");
var objectType = vars.get("$param.ObjectType_param");
var filteredIds = vars.get("$param.FilteredAttributeIds_param") ? JSON.parse(vars.getString("$param.FilteredAttributeIds_param")) : null
var attributeCountObj = vars.get("$param.AttributeCount_param") ? JSON.parse(vars.getString("$param.AttributeCount_param")) : null;
var filteredIds = Utils.parseJSON(vars.get("$param.FilteredAttributeIds_param"));
var attributeCountObj = Utils.parseJSON(vars.get("$param.AttributeCount_param"));
var displaySimpleName = Utils.toBoolean(vars.get("$param.DisplaySimpleName_param"));
var themeObjectRowId = vars.get("$param.ThemeObjectRowId_param");
......@@ -45,12 +45,12 @@ else if (objectType) //if there's an objectType, it comes from the AttributeRel
{
translateName = true;
var ids = AttributeUtil.getPossibleAttributes(objectType, true, filteredIds, attributeCountObj);
var attributeIds = AttributeUtil.getPossibleAttributes(objectType, true, filteredIds, attributeCountObj);
if (Utils.isEmpty(ids))
if (Utils.isEmpty(attributeIds))
condition.noResult();
else
condition.and("AB_ATTRIBUTE.AB_ATTRIBUTEID", ids, SqlBuilder.IN())
condition.and("AB_ATTRIBUTE.AB_ATTRIBUTEID", attributeIds, SqlBuilder.IN())
.and("AB_ATTRIBUTE.ATTRIBUTE_TYPE", AttributeTypes.THEME(), !themeObjectRowId ? SqlBuilder.NOT_EQUAL() : undefined);
}
else if (parentId)
......@@ -90,134 +90,143 @@ var filterCondition = new FilterSqlTranslator(vars.get("$local.filter"), "AB_ATT
.getSqlCondition();
condition.andIfSet(filterCondition);
var usages;
if (fetchUsages) //this query is only necessary in Attribute, not in AttributeRelation
{
var usageTbl = newSelect("AB_ATTRIBUTE_ID, OBJECT_TYPE")
.from("AB_ATTRIBUTEUSAGE")
.join("AB_ATTRIBUTE", "AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID = AB_ATTRIBUTE.AB_ATTRIBUTEID")
.whereIfSet(condition)
.table();
usages = {};
for (let i = 0, l = usageTbl.length; i < l; i++)
{
let attrId = usageTbl[i][0];
if (attrId in usages)
usages[attrId].push(usageTbl[i][1]);
else
usages[attrId] = [usageTbl[i][1]];
}
}
var usageLoader = new AttributeUsageLoader();
if (fetchUsages)
usageLoader.fetchUsages(condition);
var attributes = newSelect([
"AB_ATTRIBUTEID",
"ATTRIBUTE_PARENT_ID",
"ATTRIBUTE_NAME",
"ATTRIBUTE_ACTIVE",
"DROPDOWNDEFINITION",
"DROPDOWNFILTER",
"VALIDATIONPARAMETERS",
"SORTING",
"ATTRIBUTE_TYPE",
KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.attributeType(), "ATTRIBUTE_TYPE")
])
.from("AB_ATTRIBUTE")
.whereIfSet(condition)
.orderBy(["ATTRIBUTE_PARENT_ID", "SORTING", "ATTRIBUTE_NAME"])
.table();
var attributes = newSelect(["AB_ATTRIBUTEID, ATTRIBUTE_PARENT_ID, ATTRIBUTE_NAME, ATTRIBUTE_ACTIVE, DROPDOWNDEFINITION, DROPDOWNFILTER, SORTING, ATTRIBUTE_TYPE",
KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.attributeType(), "ATTRIBUTE_TYPE"), //3
"'', '', ''"])
.from("AB_ATTRIBUTE")
.whereIfSet(condition)
.orderBy("ATTRIBUTE_PARENT_ID, SORTING, ATTRIBUTE_NAME")
.table();
var nameResolver = new AttributeNameResolver();
if (attributes.length !== 0)
nameResolver.fetchNames(translateName);
var allNames = newSelect("AB_ATTRIBUTEID, ATTRIBUTE_PARENT_ID, ATTRIBUTE_NAME")
.from("AB_ATTRIBUTE")
.table(Utils.isEmpty(attributes));
var attrNameData = {};
for (let i = 0, l = allNames.length; i < l; i++)
var attributesById = new Map();
attributes.forEach(function ([attributeId, parentId, simpleName, isActive,
dropDownDefinition, dropDownFilter, validationParameters, sorting, type, typeName])
{
attrNameData[allNames[i][0]] = [
allNames[i][1],
translateName
? translate.text(allNames[i][2])
: allNames[i][2]
];
}
var nameCache = {};
attributesById.set(attributeId, [
attributeId,
simpleName,
displaySimpleName ? nameResolver.getSimpleName(attributeId) : nameResolver.getFullName(attributeId),
parentId,
nameResolver.getFullName(parentId),
type,
typeName,
isActive,
sorting,
dropDownDefinition,
dropDownFilter,
validationParameters,
type != AttributeTypes.COMBOVALUE() ? usageLoader.getUsageSummary(attributeId) : "",
"usageFilter",
false
]);
});
var resultTable = [];
do {
var oldSize = resultTable.length;
attributesById.forEach(function (row, id)
{
var parentId = row[3];
//rows that are already in the result array are removed from the attributesById Map, so if the parentId is in that Map,
//the parent has not been added yet
if (!parentId || !attributesById.has(parentId))
{
resultTable.push(row);
attributesById["delete"](id);
}
});
} while (oldSize != resultTable.length); //stops the loop when no new items were added so that recursive relations between attributes don't cause an infinite loop
var res = _buildAttributeTable(attributes, usages);
result.object(res);
result.object(resultTable);
//sorts the records in a way that a tree can be built and adds values
function _buildAttributeTable (pAttributes, pUsages)
function AttributeNameResolver ()
{
var rows = {};
var allIds = {};
//fills the allIds object, the object is used for checking if a parent exists in the array
for (let i = 0, l = pAttributes.length; i < l; i++)
allIds[pAttributes[i][0]] = true;
var arrayIndex = 0;
do {
var oldIndex = arrayIndex;
pAttributes.forEach(function (row)
{
//item will be added if the id is not already in the object and
//the parent is already added (or the parent is not in the array)
if (!(row[0] in this) && (row[1] in this || !allIds[row[1]]))
this[row[0]] = {
data : row,
index : arrayIndex++
};
}, rows);
} while (oldIndex != arrayIndex); //stops the loop when no new items were added so that recursive relations between attributes don't cause an infinite loop
var sortedArray = new Array(Object.keys(rows).length);
for (let i in rows)
this.cache = new Map();
this.nameData = new Map();
this.fetchNames = function (pTranslateNames)
{
let rowData = rows[i].data;
if (pUsages && rowData[7].trim() != AttributeTypes.COMBOVALUE() && i in pUsages)
var allNames = newSelect(["AB_ATTRIBUTEID", "ATTRIBUTE_PARENT_ID", "ATTRIBUTE_NAME"])
.from("AB_ATTRIBUTE")
.table();
allNames.forEach(function ([attributeId, parentId, attributeName])
{
rowData[9] = pUsages[i].map(function (usage)
{
return ContextUtils.getTitle(usage, true);
}).join(", ");
}
rowData[10] = _getFullName(rowData[1]); //parent full name
rowData[11] = _getFullName(rowData[0], displaySimpleName);
rowData[12] = "dummy";
rowData[13] = false;
sortedArray[rows[i].index] = rowData;
this.nameData.set(attributeId, {
parentId: parentId,
name: pTranslateNames ? translate.text(attributeName) : attributeName
});
}, this);
}
this.getSimpleName = function (pAttributeId)
{
if (this.nameData.has(pAttributeId))
return this.nameData.get(pAttributeId).name;
return "";
}
return sortedArray;
/**
* builds the full attribute name from the pre-loaded parent names and adds all parent names
* if required
*/
function _getFullName (pAttributeId, pSimpleName)
this.getFullName = function (pAttributeId)
{
if (!pAttributeId)
if (!pAttributeId || !this.nameData.has(pAttributeId)) //if the id is not in this.nameData, it does not exist
return "";
var attrId = pAttributeId;
var fullName = [];
if (this.cache.has(pAttributeId))
return this.cache.get(pAttributeId);
while (attrId)
var attributeData = this.nameData.get(pAttributeId);
var fullName = attributeData.name;
if (attributeData.parentId)
{
let name = null;
if (attrId in nameCache)
{
name = nameCache[attrId];
attrId = null;
}
else if (attrId in attrNameData)
{
name = attrNameData[attrId][1];
attrId = attrNameData[attrId][0]; //next parent
}
else
attrId = null;
if (name)
fullName.unshift(name);
if (pSimpleName)
break;
var parentName = this.getFullName(attributeData.parentId);
if (parentName)
fullName = parentName + " / " + fullName;
}
fullName = fullName.join(" / ");
nameCache[pAttributeId] = fullName;
this.cache.set(pAttributeId, fullName);
return fullName;
}
}
function AttributeUsageLoader ()
{
this.usageData = new Map();
this.fetchUsages = function (pCondition)
{
var usages = newSelect(["AB_ATTRIBUTE_ID", "OBJECT_TYPE"])
.from("AB_ATTRIBUTEUSAGE")
.join("AB_ATTRIBUTE", "AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID = AB_ATTRIBUTE.AB_ATTRIBUTEID")
.whereIfSet(pCondition)
.table();
usages.forEach(function ([attributeId, objectType])
{
if (this.usageData.has(attributeId))
this.usageData.get(attributeId).push(objectType);
else
this.usageData.set(attributeId, [objectType]);
}, this);
}
this.getUsages = function (pAttributeId)
{
return this.usageData.get(pAttributeId) || [];
}
this.getUsageSummary = function (pAttributeId)
{
return this.getUsages(pAttributeId).map(function (usage)
{
return ContextUtils.getTitle(usage, true);
}).join(", ");
}
}
\ No newline at end of file
......@@ -15,14 +15,15 @@ if (!sorting && parentId)
}
new SqlBuilder().insertFields({
"AB_ATTRIBUTEID" : rowdata["UID.value"],
"ATTRIBUTE_PARENT_ID" : parentId,
"DROPDOWNDEFINITION" : rowdata["DROPDOWNDEFINITION.value"],
"ATTRIBUTE_ACTIVE" : rowdata["ATTRIBUTE_ACTIVE.value"],
"ATTRIBUTE_NAME" : rowdata["ATTRIBUTE_NAME.value"],
"ATTRIBUTE_TYPE" : rowdata["ATTRIBUTE_TYPE.value"],
"DROPDOWNFILTER" : rowdata["DROPDOWNFILTER.value"],
"SORTING" : sorting
"AB_ATTRIBUTEID": rowdata["UID.value"],
"ATTRIBUTE_PARENT_ID": parentId,
"DROPDOWNDEFINITION": rowdata["DROPDOWNDEFINITION.value"],
"ATTRIBUTE_ACTIVE": rowdata["ATTRIBUTE_ACTIVE.value"],
"ATTRIBUTE_NAME": rowdata["ATTRIBUTE_NAME.value"],
"ATTRIBUTE_TYPE": rowdata["ATTRIBUTE_TYPE.value"],
"DROPDOWNFILTER": rowdata["DROPDOWNFILTER.value"],
"VALIDATIONPARAMETERS": rowdata["VALIDATIONPARAMETERS.value"],
"SORTING": sorting
}, "AB_ATTRIBUTE");
if (rowdata["ATTRIBUTE_PARENT_ID.value"] && rowdata["ATTRIBUTE_TYPE.value"] !== AttributeTypes.COMBOVALUE() && vars.get("$param.GetOnlyFirstLevelChildren_param"))
......
......@@ -10,6 +10,7 @@ var dbFields = {
"ATTRIBUTE_NAME.value" : "ATTRIBUTE_NAME",
"ATTRIBUTE_TYPE.value": "ATTRIBUTE_TYPE",
"DROPDOWNFILTER.value": "DROPDOWNFILTER",
"VALIDATIONPARAMETERS.value": "VALIDATIONPARAMETERS",
"SORTING.value" : "SORTING"
};
var fieldValues = {};
......
......@@ -8139,6 +8139,45 @@
<entry>
<key>On site</key>
</entry>
<entry>
<key>Event Data</key>
</entry>
<entry>
<key>On Site</key>
</entry>
<entry>
<key>Event Type</key>
</entry>
<entry>
<key>New child product</key>
</entry>
<entry>
<key>Communication: Link</key>
</entry>
<entry>
<key>Event Begin</key>
</entry>
<entry>
<key>Communication: Phone</key>
</entry>
<entry>
<key>Event</key>
</entry>
<entry>
<key>other</key>
</entry>
<entry>
<key>Communication: Mail</key>
</entry>
<entry>
<key>Vacation</key>
</entry>
<entry>
<key>Event End</key>
</entry>
<entry>
<key>On site</key>
</entry>
<entry>
<key>Price could not be determined</key>
</entry>
......
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