From 818734c22c42099d93f9c74bc247f866e4c1d659 Mon Sep 17 00:00:00 2001 From: Thomas Casteleyn Date: Fri, 1 Sep 2023 12:17:05 +0200 Subject: [PATCH] Document SynchroAttribute columns to be created in the data synchro table --- dictionaries/en.dictionary.itop.core.php | 1 + synchro/synchrodatasource.class.inc.php | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/dictionaries/en.dictionary.itop.core.php b/dictionaries/en.dictionary.itop.core.php index b639e6b2f8..773fc64759 100644 --- a/dictionaries/en.dictionary.itop.core.php +++ b/dictionaries/en.dictionary.itop.core.php @@ -912,6 +912,7 @@ 'Class:SynchroAttribute/Attribute:update_policy/Value:master_locked' => 'Locked', 'Class:SynchroAttribute/Attribute:update_policy/Value:master_unlocked' => 'Unlocked', 'Class:SynchroAttribute/Attribute:update_policy/Value:write_if_empty' => 'Initialize if empty', + 'Class:SynchroAttribute/Attribute:import_columns' => 'Import Columns', 'Class:SynchroAttribute/Attribute:finalclass' => 'Class', 'Class:SynchroAttExtKey' => 'Synchro Attribute (ExtKey)', 'Class:SynchroAttExtKey/Attribute:reconciliation_attcode' => 'Reconciliation Attribute', diff --git a/synchro/synchrodatasource.class.inc.php b/synchro/synchrodatasource.class.inc.php index d2af57229c..29dcba3cca 100644 --- a/synchro/synchrodatasource.class.inc.php +++ b/synchro/synchrodatasource.class.inc.php @@ -764,6 +764,7 @@ protected function CreateSynchroAtt($sAttCode) $oAttribute->Set('reconcile', 0); $oAttribute->Set('update', 0); $oAttribute->Set('update_policy', 'master_locked'); + $oAttribute->Set('import_columns', implode(',', array_keys($oAttDef->GetImportColumns()))); return $oAttribute; } @@ -1448,6 +1449,13 @@ public static function Init() 'is_null_allowed' => false, 'depends_on' => array(), ))); + MetaModel::Init_AddAttribute(new AttributeString('import_columns', array( + 'allowed_values' => null, + 'sql' => 'import_columns', + 'default_value' => null, + 'is_null_allowed' => false, + 'depends_on' => array(), + ))); // Display lists MetaModel::Init_SetZListItems('details', array(