Today I tried to find out why the imported objects don’t work the way they are supposed to, turns out when the serializedData string in serializedObjects is deserialized back into original objects it automatically sets attributes like Creator, DataSetDefinitions, CohortDefinitons, etc… to null.
I’m using XStreamShortSerializer to deserialize the XML string. I wonder how it’s done in the metadata sharing module. I had a look but I couldn’t find exactly how it’s working there.
No, but I could write a unit test for this.
But the thing is the function does run properly, it’s the persisted metadata that doesn’t work.
I wanted to know if getting a serialize object from metadata sharing module and converting the seriazlied data string into an object should work or not?
How is it handled on metadata sharing module when serialized objects are imported?
As was suggested in the last meeting I started on planning how to simplify the UI while maintaining the minimum number of tabs in the DHIS Connector module and came up with an idea. I thought of merging export mappings, import mappings and manage mappings UI into one manage dhis mappings dashboard. Here’s a basic wireframe I created to illustrate it.
i think this look ok, we will need to rename mappings to imply that more than mappings is getting imported/exported which includes OpenMRS reports etc.
Alternatively add a checkbox in the dialog that is by default selected saying include reports etc which may be unchecked and if would only export mappings or build a skip mechanism
Today, I worked on integrating the export mappings function to the manage mappings UI. I made a controller in the dhiscontroller and got it to work by writing a js function to keep the selected mappings in check.
Today I worked on and finished the manage mappings dashboard by including the export and upload mapping bundle function into it. Here’s a demo of how it works for now.
Improve manage mappings UI to handle export and import functions
The core requirement of the project is finished
@heshan suggested some additional ways to improve these functions
Let the users choose if they want to export metadata too or just the mapping files
Let the users choose if they need to replace the metadata files on the import or ignore the file if an object with the same uuid is present in the system
Plan for the next two weeks
Next week: Send PRs for those two additional improvements