Change toolbox archetype --load to update rather than remove and load archetypes

Description

The toolbox archetype --load command (previously archload) removes existing archetypes before loading the current set.

This has the advantage that out-dated archetypes don't need to be removed by a migration script, but causes problems when plugins aren't deployed after an upgrade. E.g.:

No archetype descriptor found for object, id=7897, archetype=entityIdentity.laboratoryTestIDEXXVetConnect 16491: java.lang.IllegalStateException: No archetype descriptor found for object, id=7897, archetype=entityIdentity.laboratoryTestIDEXXVetConnect 16492: at org.openvpms.web.component.im.layout.AbstractLayoutContext.getArchetypeDescriptor(AbstractLayoutContext.java:398) ~[openvpms-web-component-2.2-SNAPSHOT.jar:2.2-SNAPSHOT] 16493: at org.openvpms.web.component.im.layout.AbstractLayoutContext.getArchetypeDescriptor(AbstractLayoutContext.java:391) ~[openvpms-web-component-2.2-SNAPSHOT.jar:2.2-SNAPSHOT] 16494: at org.openvpms.web.component.im.layout.AbstractLayoutContext.getArchetypeDescriptor(AbstractLayoutContext.java:391) ~[openvpms-web-component-2.2-SNAPSHOT.jar:2.2-SNAPSHOT] 16495: at org.openvpms.web.component.im.layout.AbstractLayoutContext.getArchetypeDescriptor(AbstractLayoutContext.java:391) ~[openvpms-web-component-2.2-SNAPSHOT.jar:2.2-SNAPSHOT] 16496: at org.openvpms.web.component.property.PropertySetBuilder.getArchetypeDescriptor(PropertySetBuilder.java:218) ~[openvpms-web-component-2.2-SNAPSHOT.jar:2.2-SNAPSHOT] 16497: at org.openvpms.web.component.property.PropertySetBuilder.<init>(PropertySetBuilder.java:66) ~[openvpms-web-component-2.2-SNAPSHOT.jar:2.2-SNAPSHOT] 16498: at org.openvpms.web.component.im.view.IMObjectViewer.<init>(IMObjectViewer.java:73) ~[openvpms-web-component-2.2-SNAPSHOT.jar:2.2-SNAPSHOT] 16499: at org.openvpms.web.component.im.view.AbstractReadOnlyComponentFactory.create(AbstractReadOnlyComponentFactory.java:133) ~[openvpms-web-component-2.2-SNAPSHOT.jar:2.2-SNAPSHOT] 16500: at org.openvpms.web.component.im.view.AbstractReadOnlyComponentFactory.getCollectionViewer(AbstractReadOnlyComponentFactory.java:212) ~[openvpms-web-component-2.2-SNAPSHOT.jar:2.2-SNAPSHOT]

Change the toolbox archetype --load command to update archetypes rather than remove & load.

To support sites migrating from older versions, there will need to be a migration step that removes archetypes where there are no instances in use in the database

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Time tracking

37h logged

Components

Fix versions

Priority

Who's Looking?

Open Who's Looking?

Created July 23, 2020 at 1:00 AM
Updated October 30, 2021 at 1:29 AM
Resolved March 16, 2021 at 2:54 AM
Who's Looking?

Flag notifications