N°8162 - Issue when synchronizing datasource with read-only notify_contact_id_archive_flag#56
Open
N°8162 - Issue when synchronizing datasource with read-only notify_contact_id_archive_flag#56
Conversation
Hipska
approved these changes
Feb 6, 2025
Co-authored-by: Thomas Casteleyn <thomas.casteleyn@super-visions.com>
rquetiez
requested changes
Jul 10, 2025
accognet
requested changes
Mar 13, 2026
core/collector.class.inc.php
Outdated
Contributor
There was a problem hiding this comment.
You can also remove this $sKey variable (as on line 987), it is ambiguous.
Hipska
reviewed
Mar 13, 2026
test/collector/attribute_isnullified/iTopPersonCollector.class.inc.php
Outdated
Show resolved
Hide resolved
Hipska
reviewed
Mar 16, 2026
Hipska
suggested changes
Mar 17, 2026
core/collector.class.inc.php
Outdated
| unset($aSourceDefinition['notify_contact_id_friendlyname']); | ||
| unset($aSourceDefinition['notify_contact_id_finalclass_recall']); | ||
| unset($aSourceDefinition['notify_contact_id_obsolescence_flag']); | ||
| foreach (Collector::READONLY_FIELDS as $sField){ |
Collaborator
There was a problem hiding this comment.
Suggested change
| foreach (Collector::READONLY_FIELDS as $sField){ | |
| foreach (static::READONLY_FIELDS as $sField){ |
core/collector.class.inc.php
Outdated
| case 'notify_contact_id_archive_flag': | ||
| // Ignore all read-only attributes | ||
| break; | ||
| if (in_array($sKey, Collector::READONLY_FIELDS)){ |
Collaborator
There was a problem hiding this comment.
Suggested change
| if (in_array($sKey, Collector::READONLY_FIELDS)){ | |
| if (in_array($sKey, static::READONLY_FIELDS)){ |
core/collector.class.inc.php
Outdated
| default: | ||
| if (!array_key_exists($sKey, $aDS1)) { | ||
| Utils::Log(LOG_DEBUG, "Comparison: Found an extra property '$sKey' in iTop. Data sources differ."); | ||
| if (in_array($sKey, Collector::READONLY_FIELDS)){ |
Collaborator
There was a problem hiding this comment.
Suggested change
| if (in_array($sKey, Collector::READONLY_FIELDS)){ | |
| if (in_array($sKey, static::READONLY_FIELDS)){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Current PR aims at gathering all special attributes at the same place. These attributes should not be taken into account to deal with datasource computation/synchronization.
Symptom
Datasource synchronization may fail with below error due to a regression (PR 32/ N°6115):
[Error] Failed to update the SynchroDataSource 'XXX' (2). Reason: Error: notify_contact_id_archive_flag: Attempting to set the value on the read-only attribute SynchroDataSource::notify_contact_id_archive_flag (100)Corollary
Datasource computation has been enhanced and related test coverage completed...