specify / specify7

Specify 7
https://www.specifysoftware.org/products/specify-7/
GNU General Public License v2.0
59 stars 37 forks source link

Disposals do not impact number of available preparations #4841

Open lexiclevenger opened 3 months ago

lexiclevenger commented 3 months ago

Describe the bug After performing a disposal for a preparation object, the Current Count of preparations decreases, but the number of available preparations stays the same and allows for the preparations from the disposal to be loaned or gifted. Loaning or gifting these preparations will decrease the Current Count again and result in the count being negative.

To Reproduce Steps to reproduce the behavior:

  1. Create a new Disposal
  2. Add all available preparations for a collection object, save.
  3. Go to the collection object form and see that the Current Count is 0.
  4. Create a loan.
  5. See that the preparations added to the Disposal are available, add preparations, save.
  6. Go to the collection object form and see that the Current Count is a negative number.

Expected behavior Disposals should decrease the number of available preparations for a collection object.

Screenshots

Screenshot 2024-04-24 at 4 45 13 PM

Specify 7 System Information - 2024-04-25T19_26_12.430Z.txt

Please, also fill out the following information manually:

grantfitzsimmons commented 1 month ago

What is different between this and https://github.com/specify/specify7/issues/4655

lexiclevenger commented 1 month ago

What is different between this and #4655

I believe the problem is the same, but this issue highlights that preparations which have already been used in a disposal can still be added to interactions such as Loan and Gift. The current count reflects the correct number of preparations, as you mentioned in #4655, but the preparations are still available in the Preparations dialog for interactions. The dialog shown in the screenshot is for a Loan; there should be no preparations available according to the CO record behind it. I tested this again in edge, and the bug is still present.

Some additional details:

emenslin commented 2 weeks ago

Can recreate in edge (7.9.6) but cannot recreate the count being negative. You can add the same preparation to a disposal multiple times but the current count will just stay at zero

bronwyncombs commented 1 week ago

Jordi @ MCNB has also reported this and would like to see disposal preparations affect the availability of preparations when creating other interactions by searching Cat No

This should also apply to exchange out preparations