From 3800d24004089372c98cee5c55d0bb5aed1d690d Mon Sep 17 00:00:00 2001
From: "t.buzas" <t.buzas@adito.de>
Date: Wed, 7 Aug 2024 12:04:33 +0200
Subject: [PATCH] Removed changes

---
 CHANGELOG.md                        |  6 ------
 process/ContextUtils_lib/process.js | 11 +++--------
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4ebb81d..2e9dc0b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,12 +5,6 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
-## [4.0.2] - UNRELEASED
-
-### Added
-
-- a new sorting parameter to the getContextDataViaReadEntity function in ContextUtils_lib, determining whether data is sorted.
-
 ## [4.0.1]
 
 ### Changed
diff --git a/process/ContextUtils_lib/process.js b/process/ContextUtils_lib/process.js
index 90870a4..329a62c 100644
--- a/process/ContextUtils_lib/process.js
+++ b/process/ContextUtils_lib/process.js
@@ -352,14 +352,11 @@ ContextUtils.getTitleByContext = function(pContextId, pRowId, pProvider, pParams
  * @param {object} [pFilterObj] - prepeared Filter Object
  * @param {string[]} [pContactId] - Array of all the Contactids you want to search through
  * @param {boolean} [pIsCount] - decides if data count is returned
- * @param {boolean} [pIsSorted] - decides if data is sorted
  * @return {string[][] | number} An Array of Fields (["#UID", "#TITLE", "#MAPPING", "#CONTENTDESCRIPTION", "#CONTENTTITLE", CONNECTIONFIELD, "DATE_NEW"]) for a certain Context or the count of datasets
  * @throws {Error} When mandatory entity fields are missing
  */
-ContextUtils.getContextDataViaReadEntity = function(pContextId, pContextConfig, pFilterObj, pContactId, pIsCount, pIsSorted)
-{
-    let recordSorting = pIsSorted ? entities.RECORD_SORTING_FULL : entities.RECORD_SORTING_NONE;
-    
+ContextUtils.getContextDataViaReadEntity = function(pContextId, pContextConfig, pFilterObj, pContactId, pIsCount)
+{   
     let connectionField = "CONTACT_ID";
     if(pContextConfig.connectionField)
     {
@@ -374,7 +371,6 @@ ContextUtils.getContextDataViaReadEntity = function(pContextId, pContextConfig,
         let subConf = entities.createConfigForLoadingRows()
             .entity(ContextUtils.getEntity(pContextConfig.subContext))
             .fields([pContextConfig.childField])
-            .applyRecordSorting(recordSorting)
             .filter(JSON.stringify(prefilter.filter));
         
         let subRes = entities.getRows(subConf);
@@ -398,8 +394,7 @@ ContextUtils.getContextDataViaReadEntity = function(pContextId, pContextConfig,
     
     let conf = entities.createConfigForLoadingRows()
         .entity(ContextUtils.getEntity(pContextId))
-        .fields(fields)
-        .applyRecordSorting(recordSorting);
+        .fields(fields);
     
     if(pFilterObj)
     {
-- 
GitLab