Grant
October 10, 2025, 3:02pm
5
Hi @Franziska ,
It is true that Loan are currently scoped to the Discipline and that this is not currently configurable. At the moment, only Accession can be scoped to either the Institution or Division . This means that you cannot add objects from multiple collections across different disciplines, but you can add objects from multiple collections within the same discipline.
You need to create multiple loan records with the same identifier for each discipline to manage these objects across different collections. Other tables, such as Exchange In, Exchange Out, Accession, and Repository Agreement, are scoped at a higher level, but none serve the same purpose as Loan.
To achieve your goal, we need to make code changes on the software side. I have drafted this as a feature request for consideration in a future release:
opened 03:00PM - 10 Oct 25 UTC
2 - Interactions
2 - Database/Schema
**Is your feature request related to a problem? Please describe.**
Currently, th… e **Loan** form in Specify 7 is strictly scoped at the **Discipline** level. This means a single loan record cannot include objects from collections that belong to different disciplines. For institutions that manage large, interdisciplinary loans (such as for exhibitions), this is a significant limitation. It forces users to create multiple separate loan records for what is, in reality, a single loan event, making it difficult to track the complete history of an object or manage the loan efficiently.
**Describe the solution you'd like**
I would like the ability to configure the scope of the **Loan** table. Similar to how the **Accession** table can be scoped to the **Institution**, **Division**, or **Discipline** level, the **Loan** table should have the same configuration options. This would allow institutions to create a single loan record that includes objects from multiple collections across different disciplines or divisions, accurately reflecting their real-world workflows.
Of course, Grant. Based on the feature request from the user and an analysis of the existing data model, here are some basic requirements for implementing configurable scoping for Loans.
This feature would allow institutions to manage loans that include items from multiple collections across different disciplines, which is a common need for exhibitions and inter-departmental research.
### Functional Requirements
1. **Institution-Level Setting:**
* A new setting should be added to the **Institution** form (or in [Global Preferences](https://github.com/specify/specify7/issues/7442) to enable better permissions enforcement) that allows an administrator to define the scope for all new **Loan** records.
* This setting should provide three options: **Discipline** (default), **Division**, and **Institution**.
* The default setting must be **Discipline** to ensure backward compatibility for all existing users.
2. **Form Behavior Based on Scope:**
* **Discipline Scope (Current Behavior):** When creating a Loan, the user must select a **Discipline**. Only collection objects from within that discipline can be added to the loan.
* **Division Scope:** When creating a Loan, the user must select a **Division**. The **Discipline** field should be hidden or disabled. Users can add collection objects from any collection within the selected Division.
* **Institution Scope:** When creating a Loan, both the **Division** and **Discipline** fields should be hidden or disabled. The loan is implicitly scoped to the entire institution, and users can add collection objects from any collection.
3. **Data Validation:**
* The system must validate that any **Preparation** or **Collection Object** added to a loan belongs to a collection within the loan's defined scope (Discipline, Division, or Institution).
### Implementation Suggestions
1. **Database Schema Changes:**
* The `loan` table currently has a `DisciplineID` column that is defined as `NOT NULL`. To support Division or Institution-level scoping, this constraint must be changed to allow `NULL` values.
* Looking at the `models.py` file, this means changing the `Loan` model definition for the `discipline` field from `null=False` to `null=True`. The `division` field is already nullable.
```python
# In models.py, class Loan
discipline = models.ForeignKey('Discipline', db_column='DisciplineID', related_name='+', null=True, on_delete=protect_with_blockers) # Changed from null=False
```
2. **New Institution Setting:**
Two options, either:
* A new field should be added to the `institution` table to store this setting (e.g., `LoanScope` as a `TINYINT` or `VARCHAR`). This is analogous to the existing `IsAccessionsGlobal` field which controls the scope for Accessions.
* A new global preference should be added to store this setting (expansion of https://github.com/specify/specify7/issues/7442)
3. **Backend Logic:**
* The business logic for creating and editing loans must be updated to read the new `LoanScope` setting from the Institution.
* Validation logic for adding items to a loan (e.g., in the `LoanPreparation` form) must be updated to enforce the currently configured scope.
### Acceptance Criteria
* An **administrator** can select a scope (Discipline, Division, Institution) for Loans in the Institution settings (not a standard user).
* If the scope is set to **Division**, a user can create a loan for a Division and add items from multiple disciplines within that division.
* If the scope is set to **Institution**, a user can create a loan and add items from any collection in the institution.
* The system correctly prevents adding items to a loan from outside its defined scope.
* Existing installations that update will default to **Discipline** scope with no change in current functionality.
**Describe alternatives you've considered**
The only alternative at the moment is to create a separate loan record for each discipline involved in a multi-collection loan. This is cumbersome, creates redundant data, and makes it impossible to get a single, unified view of the entire loan.
**Reported By**
Natural History Museum Berlin (MfN Berlin) on the [Speciforum](https://discourse.specifysoftware.org/t/exhibition-support-access-to-objects-across-collections/513/4?u=grant)
**Additional context**
This request originated from a discussion about managing exhibition loans, where it is common to group items from disparate collections. The goal is to properly track the complete object history within Specify.
If other institutions are interested, please let us know so we can add a note of support to this request! @fedoras , I would be interested to hear your thoughts on this as well.
2 Likes