Skip to content

Adding new Protocol Types UI

A new Protocol Type in LabID is done in two steps:

  1. Register a Type Store entry — this declares the identifier and label that everything else refers to, and gates where the type appears in the UI.
  2. Create the matching Protocol Type — this ties the Type Store entry to the models the protocol applies to, and controls ownership and public visibility.

Both steps live in different sections of the admin panel and must be done in order. Here are the steps to add a new Protocol Type Microscopy.

Add a new Type Store

  • In the admin panel, go to Annotations > Type stores and click Add Type Store
  • Fill in the form:
  • Name = MICROSCOPY
  • Label = Microscopy
  • Content type = protocols | protocol
  • do not select any Technologies
  • Order is a number governing the order in the protocol list, between 0 and 1000; eg 850
    • Check the place where you want it, open the type stores (in another window) right before and after you'd like the new protocol to be; and pick a number in between.

Generate Field Order for the new type

A Field Order stores which fields (built-in and custom) are shown on a type — and in which order — for both the detail view and the list view. Every Type Store entry needs one before the UI can render its detail form; generic Type Store entries do not get one automatically on save, so you need to trigger it:

  • In the admin panel, go to Annotations > Type stores
  • Select the newly created type store, and use the Reset field order on selected model types (cannot be undone!) action

Note

If you attach a Custom Property Type (CPT) to this type store afterwards, the field order will be created lazily on first CPT save. Running Reset field order up front is the safe default.

Create a new Protocol Type

  • In the admin panel, go to Protocols › Protocol types and click Add Protocol Type
  • In Type store, select the previously created Type Store (eg MICROSCOPY)
  • Make it owned by admin and SYSTEM_GROUP (or equivalent for you)
  • Make sure to check the public option
  • Applicable model type here select all the models for which this protocol type would be offered; or leave empty.

Verify in the UI

  • Log in to LabID
  • Click on the user menu at the top right, and click Refresh App
  • The new protocol type should now be available where protocols are selected.