Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error when deleting a holdings that still has items with fees #3651

@PascalRepond

Description

@PascalRepond

Bug description:

In the document AND holdings detailed view for serial holdings, there is a button to delete the holdings which also deletes linked items (in cascade) when possible. This button is supposed to be inactive if something prevents the deletion (linked item with active loan, for example).

If the holdings only contains items with a fee as "reason not to delete", the holdings "Delete" button is active and clicking it leads to a system error.

Expected behavior:

In this case, the button should be grayed out, same as if an item in the holdings had an active loan. The tooltip should give the reason(s) not to delete. Example: "has 2 items with fees attached"

image

Steps to Reproduce:

⚠️ Complex to reproduce in test without data manipulation or adding fixtures since it requires a holdings to contain an item with a linked fee.

  • Find a holdings that contains only items without active loans but with pending fees
  • Try to delete the holdings (either from the document detailed view or holdings detailed view)
  • Interface freezes to gray and get error in Sentry: "IlsRecordError.NotDeleted invenio_records_rest.hold_item"

Example in production RBNJ (18.04.2024):
https://bib.rero.ch/professional/records/holdings/detail/1559437
image

Context

  • Versions: v1.21.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    UIUser interface or user experiencebugBreaks something but is not blockingf: permissionsConcerns the rights management

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions