Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Show Usages" button to the form #6328

Draft
wants to merge 11 commits into
base: production
Choose a base branch
from
Draft

Conversation

grantfitzsimmons
Copy link
Member

@grantfitzsimmons grantfitzsimmons commented Mar 15, 2025

Fixes #6327

This adds a new button to the right of the "Delete" button in the forms and dialogs within Specify, where the record is not embedded or dependent on the parent. This button displays all records that would prevent the deletion of the current record.

While this is not a one-to-one with the technical definition of "linked," it is critically important when updating existing records such as localities, collecting events, paleo contexts, and agents. This provides a safe mechanism for users to check what records are linked to the record being viewed.

image

If there are no linked records, the button will be read-only and upon hover the user will see "No linked records".
image

If there are any linked records, the button will show upon hover "Linked records"

image

Once clicked, the user will be presented with a similar dialog to the one shown when checking for standard delete blockers:

image

Admin View

adminLinkedRecords.mp4

Read-only view

If the user does not have delete permissions, you can still check for delete blockers to find references from linked records.

guestUserPermissions.mov

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add automated tests
  • Add relevant issue to release milestone
  • Add relevant documentation (Tester - Dev)
  • Add a reverse migration if a migration is present in the PR

Testing instructions

TBD

@grantfitzsimmons grantfitzsimmons changed the title Add new prop to show usages Add "Show Usages" button to the form Mar 15, 2025
@grantfitzsimmons grantfitzsimmons self-assigned this Mar 15, 2025
@grantfitzsimmons grantfitzsimmons marked this pull request as ready for review March 16, 2025 02:57
@melton-jason melton-jason self-requested a review March 17, 2025 14:13
@grantfitzsimmons
Copy link
Member Author

I'll fix the tests, dw 😄

@grantfitzsimmons grantfitzsimmons marked this pull request as draft March 18, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋Back Log
Development

Successfully merging this pull request may close these issues.

Add a "Show usages" button to see linked records
1 participant