Import/export analysis with an included "Obligation légal GDPR" asset
Hello, try to create a simple asset with existing object
- Service
- Front Office
- Back Office
- Obligation legal GDPR
Export analysis (Focus on Service), no password, only the model Try to import the asset in a existant analysis. Nothing is imported. Don't hesitate for more détails CU Thierry Petitgenet
HI Thierry,
Seems there is a little bug with the clear export/import. You can do the job with the encrypted one with the password.
Have a nice day
Jérôme
The file you export is it just containing [object object] ? If it's the case just clean the cache of your browser. In all the case, can you make a test with a cleaned cache ?
I don't understand [object object] ? The file is containing the asset "Service " that contains the three assets Font-office, Back-office And Obligation légal GDPR. I have cleared the cache. With or without password, it's the same result, asset is not or partially imported in the new analysis.
I just asked you to look into the file which is exported and tell us if the json is a complete one or if it just contains [object object].
You can for example edit the file to look into with notepad on windows.
The error is raised from here: https://github.com/monarc-project/zm-core/blob/master/src/MonarcCore/Validator/UniqueCode.php#L49 this is weird. I investigate more.
The problem seems to be when we have a "Front office" and a "Back office" in the Service asset. It is working if for example we only have a "Back Office" and "Obligation legal GDPR".
During the import of the previously exported file (Service.json), we can see that the import procedure is abrupted during the import of the second asset (Front office):
Service
Back Office
Gestion serveurs
Réseau & télécom
Organisation informatique
Développements logiciels
Salle informatique
Gestion des backups
Postes de travail admin
Bâtiment
Administrateur système
Front Office
Employés
The problem is raised when trying to import "Employés" from "Font Office".
At this stage, the content of fields (https://github.com/monarc-project/zm-core/blob/master/src/MonarcCore/Validator/UniqueName.php#L44) is:
Array
(
[name1] => Employés
[anr] => 10
)
Array
(
[name2] => Employees
[anr] => 10
)
Array
(
[name3] => Mitarbeiter
[anr] => 10
)
Array
(
[name4] => Werknemers
[anr] => 10
)
the test isValid() from UniqueName.php is called from: https://github.com/monarc-project/zm-core/blob/master/src/MonarcCore/Service/ObjectExportService.php#L291 (line 175 in exchangeArray())
In this case, as the integration method is "Fusion", items with the same name, should be overwritten, no ?
If by "fusion" you mean "merge", yes. My problem is that with the content I pasted just above, I don't see duplicates with 'Employees'.
Right. In this case, the object "Employees" has been created in two separated risk analysis. The name is the same, but not the internal reference number that is created by the system.