Migration

When updating from older versions (pre NavigaID) you might need to migrate the old lists/packages you currently have. This due to lists now supporting other types (lists/packages) within lists.

We also have a requirement on NavigaID data in the document to know who created it and which org/unit it belongs to.

Item type

With the functionality to allow multiple types in lists all items need a type attribute in order to determine which content type it is. In the example below we have an old list without types and below that a migrated one which specifies one of the types [Article, Package, List]

<list>
  <name>Example list</name>
  <description/>
  <type>list</type>
  <products>
    <product/>
  </products>
  <items limit="30">
    <item uuid="73890a03-48bb-4227-96d7-24aec558640f">
    <item uuid="9bad1876-7b6a-474b-85d7-6996913bdd48"/>
    <item uuid="7f697f6d-06dd-44db-b35e-9f7e114fa054"/>
    <item uuid="291bc370-a696-43ce-82a3-5fcde862a9f9"/>
    <item uuid="75ae8c28-1eac-4a4f-8681-108304a9a9a4"/>
  </items>
</list>
<list>
  <name>Example list</name>
  <description/>
  <type>list</type>
  <products>
    <product/>
  </products>
  <items limit="30">
    <item uuid="73890a03-48bb-4227-96d7-24aec558640f" type="Article"/>
    <item uuid="9bad1876-7b6a-474b-85d7-6996913bdd48" type="Package"/>
    <item uuid="7f697f6d-06dd-44db-b35e-9f7e114fa054" type="Article"/>
    <item uuid="291bc370-a696-43ce-82a3-5fcde862a9f9" type="List"/>
    <item uuid="75ae8c28-1eac-4a4f-8681-108304a9a9a4" type="Article"/>
  </items>
</list>

In order to be able to display the lists and packages in an NavigaID enabled environment they need to have the required data in the document itself. Below is an example of the data that needs to be added with units/orgs and how it looks in the full example

<itemMeta>
    <links xmlns="http://www.infomaker.se/newsml/1.0">
      <link rel="affiliation" type="x-imid/organisation" uri="imid://organisation/imid-internal" title="imid-internal">
        <links>
          <link rel="affiliation" type="x-imid/unit" uri="imid://unit/imnews" title="imnews"/>
        </links>
      </link>
    </links>
  </itemMeta>

List

<list>
    <name>Example list</name>
    <description/>
    <type>list</type>
    <products>
        <product/>
    </products>
    <items limit="30">
        <item uuid="73890a03-48bb-4227-96d7-24aec558640f" type="Article"/>
        <item uuid="9bad1876-7b6a-474b-85d7-6996913bdd48" type="Package"/>
        <item uuid="7f697f6d-06dd-44db-b35e-9f7e114fa054" type="Article"/>
        <item uuid="291bc370-a696-43ce-82a3-5fcde862a9f9" type="List"/>
        <item uuid="75ae8c28-1eac-4a4f-8681-108304a9a9a4" type="Article"/>
    </items>
    <itemMeta>
        <links xmlns="http://www.infomaker.se/newsml/1.0">
            <link rel="creator" type="x-imid/user" uri="imid://user/sub/znY7U3CO134n26zv9gb44_jCzSp">
                <links>
                    <link rel="affiliation" type="x-imid/organisation" uri="imid://organisation/company-x" title="Company X">
                        <links>
                            <link rel="affiliation" type="x-imid/unit" uri="imid://unit/newspaper-z" title="Newspaper Z"/>
                        </links>
                    </link>
                </links>
            </link>

            <link rel="updater" type="x-imid/user" uri="imid://user/sub/znY7U3CO134n26zv9gb44_jCzSp">
                <links>
                    <link rel="affiliation" type="x-imid/organisation" uri="imid://organisation/company-x" title="Company X">
                        <links>
                            <link rel="affiliation" type="x-imid/unit" uri="imid://unit/newspaper-z" title="Newspaper Z"/>
                        </links>
                    </link>
                </links>
            </link>
        </links>
    </itemMeta>
</list>

Package

<package published="false">
    <cover uuid="1171e4d7-f8e9-49b8-8df4-668dcf4050da"/>
    <name>Example package</name>
    <type>Daily</type>
    <products>
        <product/>
    </products>
    <category/>
    <pubStart>2019-08-08T07:40:23.000Z</pubStart>
    <pubStop/>
    <pubStatus>draft</pubStatus>
    <itemList uuid="5d940e6a-653e-4fa9-8947-abeae89f721d"/>
    <itemMeta>
        <links xmlns="http://www.infomaker.se/newsml/1.0">
            <link rel="creator" type="x-imid/user" uri="imid://user/sub/znY7U3CO134n26zv9gb44_jCzSp">
                <links>
                    <link rel="affiliation" type="x-imid/organisation" uri="imid://organisation/company-x" title="Company X">
                        <links>
                            <link rel="affiliation" type="x-imid/unit" uri="imid://unit/newspaper-z" title="Newspaper Z"/>
                        </links>
                    </link>
                </links>
            </link>

            <link rel="updater" type="x-imid/user" uri="imid://user/sub/znY7U3CO134n26zv9gb44_jCzSp">
                <links>
                    <link rel="affiliation" type="x-imid/organisation" uri="imid://organisation/company-x" title="Company X">
                        <links>
                            <link rel="affiliation" type="x-imid/unit" uri="imid://unit/newspaper-z" title="Newspaper Z"/>
                        </links>
                    </link>
                </links>
            </link>
        </links>
    </itemMeta>
</package>

Last updated