inbo / collective-access

CollectiveAccess is free, open-source software for cataloguing and publishing museum and archival collections. We are currently evaluating and configuring the application for the INBO collections, in the context of the DiSSCo Flanders project (https://dissco-flanders.be/).
3 stars 0 forks source link

Limit amount of relationships #148

Open Eveltjen00 opened 4 months ago

Eveltjen00 commented 4 months ago

For example: storage location <> objects You only want users to be able to select that a plantlot is stored in a plantlotSite, plantlotSitespot You only want users to be able to select that seedlots, DNA samples are in a freezer, shelve, box, boxSpot..

Same goes for object <> object From a soil sample you cannot derive a mammal sample etc...

Eveltjen00 commented 4 months ago

Executed for storage location `

ca_storage_locations
                <settings>
            <setting name="label" locale="en_US">Object is stored at</setting>
            <setting name="restrict_to_types">forestTreePopulationSite,forestTreePopulationSiteSpot</setting>
            <setting name="minRelationshipsPerRow">0</setting>
            <setting name="maxRelationshipsPerRow">1</setting>
          </settings>
        </placement>
        <placement code="ca_storage_location" typeRestrictions="animalObject,leafSample,littertrapSample,seedlot,dnaSample,waterObject,soilObject" includeSubtypes="1">
          <bundle>ca_storage_locations</bundle>
                <settings>
            <setting name="label" locale="en_US">Object is stored at</setting>
            <setting name="restrict_to_types">room,cabinetFridgeFreezer,drawershelf,box,spot</setting>
            <setting name="minRelationshipsPerRow">0</setting>
            <setting name="maxRelationshipsPerRow">1</setting>
          </settings>
        </placement>

`

Eveltjen00 commented 4 months ago

Also tried for an animal sampling point with hierarchy_location, but not sure if type restriction will work here. To check image

Eveltjen00 commented 4 months ago

We cannot test this yet for storage locations as we do not have the availability to add storage locations via the hierachy browser image

We added both a lookup and hierarchy image

You can still add everything under animal sampling point image image