Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document SynchroAttribute columns #541

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions dictionaries/en.dictionary.itop.core.php
Expand Up @@ -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',
Expand Down
8 changes: 8 additions & 0 deletions synchro/synchrodatasource.class.inc.php
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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(
Expand Down