From 60bdef67524fe14b64eff5776cbea28eb1605c76 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 22 Sep 2022 17:36:42 +0200 Subject: [PATCH] Sync: create objects with original key... ...and not with the lower-cased comparison key fixes #2608 --- library/Director/Import/Sync.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Director/Import/Sync.php b/library/Director/Import/Sync.php index c55a6ad1..b7fc0ba0 100644 --- a/library/Director/Import/Sync.php +++ b/library/Director/Import/Sync.php @@ -483,10 +483,12 @@ class Sync foreach ($this->sources as $source) { $sourceId = $source->id; + $keyColumn = $source->get('key_column'); foreach ($this->imported[$sourceId] as $key => $row) { // Workaround: $a["10"] = "val"; -> array_keys($a) = [(int) 10] $key = (string) $key; + $originalKey = $row->$keyColumn; if ($this->usedLowerCasedKeys) { $key = strtolower($key); } @@ -497,7 +499,7 @@ class Sync } else { $props = [ 'object_type' => 'object', - 'object_name' => $key + 'object_name' => $originalKey, ]; }