Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Data Import until 1.2 won't support templates between versions.  In this page we will mention show a possible workarounds workaround to be able to import a Template for into a different version into the desired version.

Option 1: Modify HTML

Details

This is a bit of a backdoor change where we modify the form from the generated HTML. This is possible because the version number validation is done after clicking the 'Import Template' button.

There are validations after clicking the button, therefore, this will only work when specifying an existing ODS / API version which makes the change safe and will not impact negatively the existing data or the Database structure.

1) Select the desired template and click on view:Image Removed

2) On the Template Sharing, right click over the API version number and select Inspect Element

Image Removed

3) After clicking the element, the HTML will appear. Below the version number, there's an <input> field with the ODS / API version number and a property "type: hidden":

Image Removed

4) Double click on the input field (in the Developer Console) and remove the type="hidden" property, press enter and a new input field appears on the screen:

Image Removed

5) Enter the desired ODS/ API version number into the input field, and click on 'Import Template':

Image Removed

6) If the version is valid, and the data does not exist in the system, the data will be correctly imported.

Image Removed

Video

https://www.screencast.com/t/BjLe8DfPFFR

Option 2: Build JSON

Details

This involves mapping data with a text editor.

1) Select the desired template and click on view:

Image Removed

2) Create a new Template used to build the JSON File: Import-Template.json

Steps

1) Download and open the attached JSON file in your system, this could can be done from any test editor but it's recommended to use one that checks if the JSON file is valid before adding it into the system

Image Added

2) Select the desired template and click on view:

Image RemovedImage Added

3) Copy the information from the Template Information section :

Image Removed

4) Paste the copied data into the JSON file and add quotes "",  colons : and commas , between lines.

5) Modify the "Ed-Fi ODS / API Version" text to "APIVersion"

Image Removed

6) Modify the ODS / API version field to be the desired version:

Image Removed

7and paste it into the Title and Description fields:

Image Added

Image Added

4) Specify the desired ODS / API version in the APIVersion field:

Image Added

5) Copy the information from the Submitter Submitted Information section :

Image Removed

8) Paste the copied data into the JSON file and add quotes "",  colons : and commas , between lines:

Image Removed

9) Add a property "Template" to the JSON file, with a colon at the end:

Image Removed

10) Copy the information from the Template Preview section and paste it next to the template property (there's no need to modify the data from the Template Preview):

Image Removed

11and paste it into the Name, Email and Organization fields:

Image Added

Image Added

6) Copy the content of the template preview and paste it in the Template field replacing the empty brackets {}

Image Added

Image Added

7) Save the file.

128) Go to the Import / Export section:

139) Choose the file created and click Import:

1410) If the version is valid, and the data does not exist in the system, the data will be correctly imported.

...