Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-4420

Fix generated XML when using doctype copy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 73.1.1
    • Fix Version/s: 73.5
    • Component/s: Builders, Documents, Schemas
    • Sprint:
      nxNest Sprint 10.1.1, nxNest Sprint 10.1.2
    • Story Points:
      3

      Description

      In Studio, using JSF UI:

      • Create a doctype named "bla"
      • Copy this doctype as "CopyA"
      • Copy "CopyA" as "CopyB"
      • Download package

      => Type is kept as "bla" for the copied doctypes
      => Layouts used are the one for "bla"
      => Schemas are not properly configured
      => CopyA and CopyB can't be created in the expected containers as the XML does not mention them
      => In activation filters, even when doctype copy label has changed you are being offered twice the original doctype name (see activation-filters-2017-12-26 10-17 video)

      <extension target="org.nuxeo.ecm.core.lifecycle.LifeCycleService" point="types">
      [...]
      <type id="bla">
            <label>CopyA</label>
      
      <extension target="org.nuxeo.ecm.platform.types.TypeService" point="types">
      [...]
          <type id="bla">
            <label>CopyA</label>
            <description>toto</description>
            <default-view>view_documents</default-view>
            <layouts mode="create">
              <layout>layout@bla-create</layout>
            </layouts>
            <layouts mode="edit">
              <layout>layout@bla-edit</layout>
            </layouts>
            <layouts mode="view">
              <layout>layout@bla-view</layout>
            </layouts>
          </type>
          <type id="bla">
            <label>CopyB</label>
            <description>toto</description>
            <default-view>view_documents</default-view>
            <layouts mode="create">
              <layout>layout@bla-create</layout>
            </layouts>
            <layouts mode="edit">
              <layout>layout@bla-edit</layout>
            </layouts>
            <layouts mode="view">
              <layout>layout@bla-view</layout>
            </layouts>
          </type>
      
      <extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
      [...]
      <doctype name="bla" extends="File">
            <schema name="copya"/>
          </doctype>
          <doctype name="Folder" append="true">
            <subtypes>
              <type>bla</type>
            </subtypes>
          </doctype>
          <doctype name="Workspace" append="true">
            <subtypes>
              <type>bla</type>
            </subtypes>
          </doctype>
          <doctype name="bla" extends="File">
            <schema name="copyb"/>
          </doctype>
      
      <extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
      [...]
      <doctype name="Workspace" append="true">
            <subtypes>
              <type>bla</type>
            </subtypes>
      

      Expected:

      • For the problems above and any other features related to document type copy, generated XML should be correct.

      Acceptance criteria:

      • When doing a doctype copy:
        • Copied doctype is available in the activation filters, e.g. in event handlers screen, user actions (needs JSF UI dependency) or automation chains
      • When doing a hot reload:
        • doctype can be created in the expected containers
        • doctype accepts the expected children types
        • doctype shows the appropriate layouts
        • doctype uses the appropriate schemas
        • original doctype is not affected by the copy (i.e. still has the same config)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 3 hours
                  1d 3h