Currently, if you want a title to be linked to an instance in inventory you need to select a pre-existing instance. Ideally this should work the same way as the POLine logic. If you're creating a title and an instanceId isn't provided, honor the "createInventory" settings and find/create one using the information provided. This happens when creating the first piece for that title. The title record is then updated with the resulting instanceId (if applicable).
This only applies to the "manually add pieces" flow. See
- instances/holdings/items are conditionally created upon piece creation and the associated title record is updated with the resulting instanceId
- the related POL and settings for "createInventory" are honored
- defaults from order settings (loanType, instanceType, etc.) are used when creating instances for new titles
- unit tests are updated
- api tests are updated