Skip to content
Snippets Groups Projects
Commit 75eb0ef1 authored by Pascal Neub's avatar Pascal Neub Committed by Benjamin Ulrich
Browse files

[Projekt: xRM-Sales][TicketNr.: 1084061][Sortierung der Checklisteinträge]

parent 871fcaa9
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: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="p.neub" id="72c02d33-8107-45b2-8034-c96c10ba4164">
<addColumn tableName="CHECKLISTENTRY">
<column name="POS" type="INTEGER"/>
</addColumn>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -3,4 +3,5 @@
<include relativeToChangelogFile="true" file="alter_Checklist.xml"/>
<include relativeToChangelogFile="true" file="alter_ChecklistEntry.xml"/>
<include relativeToChangelogFile="true" file="alter_ChecklistDateDatatypes.xml"/>
<include relativeToChangelogFile="true" file="add_checklist_sort.xml"/>
</databaseChangeLog>
\ No newline at end of file
......@@ -17661,6 +17661,20 @@
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>POS</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="4" />
<size v="10" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......
import("system.translate");
import("system.util");
import("system.vars");
import("system.result");
......@@ -30,11 +31,13 @@ var data = newSelect([
.and("CHECKLISTENTRYVALUE.OBJECT_ROWID", vars.get("$param.ObjectRowId_param"))
.andIfSet("CHECKLISTENTRYVALUE.OBJECT_TYPE", vars.get("$param.ObjectType_param"))
).whereIfSet("CHECKLISTENTRY.CHECKLIST_ID", checklistIds, SqlBuilder.IN())
.orderBy("CHECKLISTENTRY.POS asc")
.table();
for(let i = 0; i < data.length; i++)
{
data[i][0] = data[i][0] || util.getNewUUID();
data[i][3] = translate.text(data[i][3]);
data[i][8] = data[i][8] || "0";
data[i][9] = data[i][9] || vars.get("$param.ObjectRowId_param");
data[i][10] = data[i][10] || vars.get("$param.ObjectType_param");
......
......@@ -8,10 +8,12 @@
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
<sortingField>POS</sortingField>
</entityProvider>
<entityProvider>
<name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" />
<sortingField>POS</sortingField>
</entityProvider>
<entityField>
<name>CHECKLISTENTRYID</name>
......@@ -52,6 +54,7 @@
</entityField>
<entityProvider>
<name>ChecklistEntries</name>
<sortingField>POS</sortingField>
</entityProvider>
<entityField>
<name>CHECKLIST_ID</name>
......@@ -92,11 +95,17 @@
<element>MASK</element>
</onValueChangeTypes>
</entityField>
<entityField>
<name>POS</name>
<title>Position</title>
<contentType>NUMBER</contentType>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
<name>db</name>
<conditionProcess>%aditoprj%/entity/ChecklistEntry_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<orderClauseProcess>%aditoprj%/entity/ChecklistEntry_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
<alias>Data_alias</alias>
<recordFieldMappings>
<dbRecordFieldMapping>
......@@ -139,6 +148,10 @@
<name>FILTER_USED.value</name>
<recordfield>CHECKLISTENTRY.FILTER_USED</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>POS.value</name>
<recordfield>CHECKLISTENTRY.POS</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
<linkInformation>
<linkInformation>
......
import("system.result");
import("system.db");
result.object({
"CHECKLISTENTRY.POS": db.ASCENDING
});
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