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)