Describe the bug
A clear and concise description of what the bug is.
When isEmbeddedCollectingEvent=true, Specify expects a CE ID for each CO loaded when processing a loan return preparation. If a loan preparation belongs to a CO without a CE, returning the loan will result in a crash. If a CE is added to the loan prep's CO, it can then be returned without error.
Note: CollectingEvent is not required relationship for CO in schema config and no save block prevents creating a CO without a CE via forms or WorkBench. In fact, in the case of the reporting institution, there are no required fields on CE and simply added a blank CE avoids the crash.
According to @melton-jason, this is a known issue as of v7.10. He describes it as:
specifically if you ( or Specify, behind the scenes) edit the Preparation when you're saving a Loan (also a way to do it with LoanPreparation).
See 57f9142#diff-cda0db91ab7dcb0a7df5c8540ecb3fd9d270ae1844e389ea767b755a2ead464bR12-R375
To Reproduce
Steps to reproduce the behavior:
- Go to https://mhnf20260807-v7.test.specifysystems.org/specify/view/loan/6/
- Click on Return Loan > Select All > Apply
- Save Loan
- See crash
Expected Behavior
- No error upon loan return in this situation.
- Collection Objects should be able to exist without a Collecting Event, even if embedded. I.e., when "Required" is false for CollectingEvent on CollectionObject, then its ID shouldn't be required for COs.
- If CE is required, the business rule that adds the CE should only be active when the Collection Object is new, not for pre-existing COs.
Crash Report
Specify 7 Crash Report - 2026-08-07T06_56_39.060Z.txt
Please fill out the following information manually:
Reported By
Name of your institution
Musée d'histoire Naturelle Fribourg via 1212
Describe the bug
A clear and concise description of what the bug is.
When
isEmbeddedCollectingEvent=true, Specify expects a CE ID for each CO loaded when processing a loan return preparation. If a loan preparation belongs to a CO without a CE, returning the loan will result in a crash. If a CE is added to the loan prep's CO, it can then be returned without error.Note: CollectingEvent is not required relationship for CO in schema config and no save block prevents creating a CO without a CE via forms or WorkBench. In fact, in the case of the reporting institution, there are no required fields on CE and simply added a blank CE avoids the crash.
According to @melton-jason, this is a known issue as of
v7.10. He describes it as:See 57f9142#diff-cda0db91ab7dcb0a7df5c8540ecb3fd9d270ae1844e389ea767b755a2ead464bR12-R375
To Reproduce
Steps to reproduce the behavior:
Expected Behavior
Crash Report
Specify 7 Crash Report - 2026-08-07T06_56_39.060Z.txt
Please fill out the following information manually:
Reported By
Name of your institution
Musée d'histoire Naturelle Fribourg via 1212