Skip to content

Conversation

@CarolineDenis
Copy link
Contributor

@CarolineDenis CarolineDenis commented Mar 27, 2025

Fixes #1431

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone

Testing instructions

  • Open an existing CO or create one
  • Add a loanable prep type prep
  • Create a loan with that CO and that prep
  • Save the loan
  • Go back to the CO form
  • Try to delete the prep that is used in the loan
  • Verify there is a safe blocker telling you that you cannot delete a prep that is on loan

TODO:

  • Add isOnGift documentation and other interactions

Triggered by 0b7cc25 on branch refs/heads/issue-1431
Copy link
Member

@grantfitzsimmons grantfitzsimmons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Verify there is a safe blocker telling you that you cannot delete a prep that is on loan
Screen.Recording.2025-03-27.at.9.28.16.PM.mov

@grantfitzsimmons grantfitzsimmons requested a review from a team March 28, 2025 02:30
Copy link
Collaborator

@emenslin emenslin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Verify there is a safe blocker telling you that you cannot delete a prep that is on loan

This only works when the preparation is on loan, it does not work if the preparation is linked to any other interaction (e.g. gift, disposal, exchange out)

04-01_08.41.mp4

@github-project-automation github-project-automation bot moved this from 📋Back Log to Dev Attention Needed in General Tester Board Apr 1, 2025
@CarolineDenis
Copy link
Contributor Author

CarolineDenis commented Apr 1, 2025

NOTES:
preparation.disposalPreparation returns: '/api/specify/disposalpreparation/?preparation=449'
449 being the prep id.
It doesn't seem that there is a simple way to know from prep if it's gifted or disposed or not.
Maybe we should add new attribute like isOnLoan for the other interactions?

@grantfitzsimmons
Copy link
Member

grantfitzsimmons commented Apr 1, 2025

Re: #6374 (comment)

Maybe we should add new attribute like isOnLoan for the other interactions?

See #5665, I think it's a great idea.

Also see this PR I've been thinking about since January: #6110

If you want to extend or take that over that's OK with me. I'll get to it eventually in any case 😄

@CarolineDenis CarolineDenis requested review from a team, emenslin and sharadsw April 1, 2025 17:49
Copy link
Contributor

@pashiav pashiav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Verify there is a safe blocker telling you that you cannot delete a prep that is on loan

Works for other interactions other than loan now!


Found that this workflow does not have a save blocker even though it recognizes that there is a linked Loan to the prep.
CO: https://ciscollections20250210-issue-1431.test.specifysystems.org/specify/view/collectionobject/40263/
Loan: https://ciscollections20250210-issue-1431.test.specifysystems.org/specify/view/loan/252/

  1. View or create a CO with preps
  2. Interactions -> Loan (or any other interaction) -> add prep from that CO -> Save
  3. Use the navigator to go back to CO
  4. Click SHOW_LOANS -> See that there is a loan record
  5. Delete prep -> Save -> See error
Screen.Recording.2025-04-02.at.11.38.41.AM.1.mov

Specify 7 System Information - 2025-04-02T16_44_55.203Z.txt

Copy link
Contributor

@pashiav pashiav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving since behavior is expected.

@CarolineDenis: "we do not fix the 'reload' issue it's like that everywhere in Sp"

@pashiav pashiav requested a review from a team April 2, 2025 16:55
Copy link
Contributor

@Areyes42 Areyes42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Verify there is a safe blocker telling you that you cannot delete a prep that is on loan

Looks good, I also tested deleting the prep when browsing in forms on QB and the blocker appeared 👍

@CarolineDenis CarolineDenis merged commit 452c6d7 into production Apr 2, 2025
12 checks passed
@CarolineDenis CarolineDenis deleted the issue-1431 branch April 2, 2025 18:03
@github-project-automation github-project-automation bot moved this from Dev Attention Needed to ✅Done in General Tester Board Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Error message when trying to delete a preparation linked to an interaction

8 participants