Summary: | Deleting a record should alert or fail if there are current subscriptions | ||
---|---|---|---|
Product: | Koha | Reporter: | Jared Camins-Esakov <jcamins> |
Component: | Cataloging | Assignee: | Marion Durand <marion.durand.lelion> |
Status: | CLOSED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrewfh, david, frank.hansen, fridolin.somers, gmcharlt, jonathan.druart, katrin.fischer, kyle, m.de.rooy, marion.durand.lelion, marjorie.barry-vila, mathsabypro, samu.heiskanen, severine.queune, victor |
Version: | Main | Keywords: | Manual |
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This change prevents the deletion of records with current serial subscriptions.
Selecting "Delete record" when there are existing subscriptions no longer deletes the record and subscription, and adds an alert box "[Count] subscription(s) are attached to this record. You must delete all subscriptions before deleting this record.".
It also:
- adds a "Subscriptions" column in the batch deletion records tool with the number of subscriptions and a link to the search page with all the subscriptions for the record, and
- adds a button in the toolbar to enable selecting only records without subscriptions.
|
Version(s) released in: |
22.05.00,21.11.01,21.05.08
|
Bug Depends on: | 5790 | ||
Bug Blocks: | |||
Attachments: |
Bug 9565: Deleting a biblio should alert/fail if there are existent subscriptions
Bug 9565: Deleting a biblio should alert/fail if there are existent subscriptions Bug 9565: (follow-up) Deleting a biblio should alert/fail if there are existent subscriptions Bug 9565: (follow-up) Deleting a biblio should alert/fail if there are existent subscriptions Bug 9565: (follow-up) Deleting a biblio should alert/fail if there are existent subscriptions Bug 9565: (follow-up) Adapt batch record deletion tool Bug 9565: Deleting a biblio should alert/fail if there are existent subscriptions Bug 9565: (follow-up) Deleting a biblio should alert/fail if there are existent subscriptions Bug 9565: (follow-up) Adapt batch record deletion tool Bug 9565: Deleting a biblio should alert/fail if there are existent subscriptions Bug 9565: (follow-up) Deleting a biblio should alert/fail if there are existent subscriptions Bug 9565: (follow-up) Adapt batch record deletion tool Bug 9565: Use Koha::Biblio Bug 9565: Use Koha::Biblio (rebase for 21.05.x) Bug 9565: (follow-up) Adapt batch record deletion tool (rebase for 21.05.x) |
Description
Jared Camins-Esakov
2013-02-07 12:33:00 UTC
Still valid. Created attachment 113589 [details] [review] Bug 9565: Deleting a biblio should alert/fail if there are existent subscriptions Currently Koha will delete a biblio record if there are existent serial subscriptions. This patch will prevent deleting the biblio until attached subscriptions are removed. To test: 1) Add a subscription to a biblio, or check a biblio which has one attached already. 2) Remove all items if there are any. 3) Apply patch. 4) Confirm that the 'Delete record' item is disabled in the list. 5) Sign off. Sponsored by: Lunds Universitetsbibliotek Created attachment 113591 [details] [review] Bug 9565: Deleting a biblio should alert/fail if there are existent subscriptions Currently Koha will delete a biblio record if there are existent serial subscriptions. This patch will prevent deleting the biblio until attached subscriptions are removed. To test: 1) Add a subscription to a biblio, or check a biblio which has one attached already. 2) Remove all items if there are any. 3) Apply patch. 4) Confirm that the 'Delete record' item is disabled in the list. 5) Sign off. Sponsored by: Lunds Universitetsbibliotek Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Hi :)
> 4) Confirm that the 'Delete record' item is disabled in the list.
It's still possible to click "Delete record" despite it looking disabled. And the record & subscription will be deleted.
Created attachment 126821 [details] [review] Bug 9565: (follow-up) Deleting a biblio should alert/fail if there are existent subscriptions Currently Koha will delete a biblio record if there are existent serial subscriptions. This patch will prevent deleting the biblio until attached subscriptions are removed. To test: 1) Add a subscription to a biblio, or check a biblio which has one attached already. 2) Remove all items if there are any. 3) Apply patch. 4) Confirm that the 'Delete record' item is disabled in the list. 5) Attempt to 'Delete record', you should recieve an error message stating to delete all subscriptions before deleting record. 6) Sign off. Sponsored by: Lunds Universitetsbibliotek Created attachment 126905 [details] [review] Bug 9565: (follow-up) Deleting a biblio should alert/fail if there are existent subscriptions Clicking on "Delete record" while there are existent subscriptions no longer delete the record and the subscription. Instead an alert box inform the user that he must delete all subscription before deleting the record. To test: 1) Add a subscription to a biblio, or check a biblio which has one attached already. 2) Remove all items if there are any. 3) Apply patch. 4) Confirm that the 'Delete record' item is disabled in the list. 5) Attempt to 'Delete record', you should recieve an error message stating to delete all subscriptions before deleting record. 6) Sign off. Sponsored by: Lunds Universitetsbibliotek When you click "Delete record" it still asks: "Are you sure you want to delete this record?", though it won't really delete it even if you click ok. (In reply to Samu Heiskanen from comment #7) > When you click "Delete record" it still asks: "Are you sure you want to > delete this record?", though it won't really delete it even if you click ok. Thank for testing the patch. I think you need to empty your browser cash for the second patch to take into effect. I don't have this problem on my first setup but on my second I have seen it and emptying the cash of my browser (or restarting koha) solved the problem. Have you tried that ? I tried and now it works fine. Thanks for your advice. Created attachment 126905 [details] [review] [review] Bug 9565: (follow-up) Deleting a biblio should alert/fail if there are existent subscriptions Clicking on "Delete record" while there are existent subscriptions no longer delete the record and the subscription. Instead an alert box inform the user that he must delete all subscription before deleting the record. To test: 1) Add a subscription to a biblio, or check a biblio which has one attached already. 2) Remove all items if there are any. 3) Apply patch. 4) Confirm that the 'Delete record' item is disabled in the list. 5) Attempt to 'Delete record', you should recieve an error message stating to delete all subscriptions before deleting record. 6) Sign off. Sponsored by: Lunds Universitetsbibliotek Signed-off-by: Samu heiskanen <samu.heiskanen@hypernova.fi> Created attachment 128051 [details] [review] Bug 9565: (follow-up) Deleting a biblio should alert/fail if there are existent subscriptions Clicking on "Delete record" while there are existent subscriptions no longer delete the record and the subscription. Instead an alert box inform the user that he must delete all subscription before deleting the record. To test: 1) Add a subscription to a biblio, or check a biblio which has one attached already. 2) Remove all items if there are any. 3) Apply patch. 4) Confirm that the 'Delete record' item is disabled in the list. 5) Attempt to 'Delete record', you should recieve an error message stating to delete all subscriptions before deleting record. 6) Sign off. Sponsored by: Lunds Universitetsbibliotek Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi> Then you need to adjust the batch record deletion tool as well. I'm not sure what to do in batch record deletion as it is the same behavior as when there are attached items. From a record page, it's impossible to delete the record if there is any item attached to it but it is still possible to delete it from batch record deletion. Plus there is a reminder to warn the user that deleting the biblio will also delete attached subscription, holds and items (even if I can't find yet where in the code we delete the subscription) Maybe we could add a column to show the user how many subscriptions are attached to the biblio (just as items holds and checkouts) and add the possibility to select without subscription (as for items and holds). Should we block the deletion of biblio records with attached subscriptions ? (In reply to marion.durand from comment #13) > Maybe we could add a column to show the user how many subscriptions are > attached to the biblio (just as items holds and checkouts) and add the > possibility to select without subscription (as for items and holds). Yes, that. It's what I was suggesting. Ok I'll do that. Thank you for answering so quickly Created attachment 128160 [details] [review] Bug 9565: (follow-up) Adapt batch record deletion tool Add a column "Subscriptions" to the batch deletion tools Add a link on the number of subscription to the search page with all the subscriptions of the record Add a button in the toolbar to select only biblio record without subscriptions The changes are only on display It is still possible to delete records that are attached to subscriptions from this tool (as it is possible for records with attached items) To test: 1) Go to the batch record deletion (in tools) 2) Select a list of record numbers (select some with one or more subscription) 3) Click on Continue 4) Check that there is no column named "Subscription" and that there is no button "Select without subscription" in the toolbar 5) Apply patch 6) Repeat steps 1 to 3 7a) Check that there is a column named "Subscription" fill with the number of subscriptions attached to the record 7b) Check that the link in the subscriptions column send you to the search page with the subscriptions linked to this record 7c) Check that there is a button "Select without subscription" in the toolbar that selects record with no subscription attached 8) Sign off Created attachment 128163 [details] [review] Bug 9565: Deleting a biblio should alert/fail if there are existent subscriptions Currently Koha will delete a biblio record if there are existent serial subscriptions. This patch will prevent deleting the biblio until attached subscriptions are removed. To test: 1) Add a subscription to a biblio, or check a biblio which has one attached already. 2) Remove all items if there are any. 3) Apply patch. 4) Confirm that the 'Delete record' item is disabled in the list. 5) Sign off. Sponsored by: Lunds Universitetsbibliotek Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> Created attachment 128164 [details] [review] Bug 9565: (follow-up) Deleting a biblio should alert/fail if there are existent subscriptions Clicking on "Delete record" while there are existent subscriptions no longer delete the record and the subscription. Instead an alert box inform the user that he must delete all subscription before deleting the record. To test: 1) Add a subscription to a biblio, or check a biblio which has one attached already. 2) Remove all items if there are any. 3) Apply patch. 4) Confirm that the 'Delete record' item is disabled in the list. 5) Attempt to 'Delete record', you should recieve an error message stating to delete all subscriptions before deleting record. 6) Sign off. Sponsored by: Lunds Universitetsbibliotek Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi> Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> Created attachment 128165 [details] [review] Bug 9565: (follow-up) Adapt batch record deletion tool Add a column "Subscriptions" to the batch deletion tools Add a link on the number of subscription to the search page with all the subscriptions of the record Add a button in the toolbar to select only biblio record without subscriptions The changes are only on display It is still possible to delete records that are attached to subscriptions from this tool (as it is possible for records with attached items) To test: 1) Go to the batch record deletion (in tools) 2) Select a list of record numbers (select some with one or more subscription) 3) Click on Continue 4) Check that there is no column named "Subscription" and that there is no button "Select without subscription" in the toolbar 5) Apply patch 6) Repeat steps 1 to 3 7a) Check that there is a column named "Subscription" fill with the number of subscriptions attached to the record 7b) Check that the link in the subscriptions column send you to the search page with the subscriptions linked to this record 7c) Check that there is a button "Select without subscription" in the toolbar that selects record with no subscription attached 8) Sign off Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> Signed off using sandbox Created attachment 128278 [details] [review] Bug 9565: Deleting a biblio should alert/fail if there are existent subscriptions Currently Koha will delete a biblio record if there are existent serial subscriptions. This patch will prevent deleting the biblio until attached subscriptions are removed. To test: 1) Add a subscription to a biblio, or check a biblio which has one attached already. 2) Remove all items if there are any. 3) Apply patch. 4) Confirm that the 'Delete record' item is disabled in the list. 5) Sign off. Sponsored by: Lunds Universitetsbibliotek Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 128279 [details] [review] Bug 9565: (follow-up) Deleting a biblio should alert/fail if there are existent subscriptions Clicking on "Delete record" while there are existent subscriptions no longer delete the record and the subscription. Instead an alert box inform the user that he must delete all subscription before deleting the record. To test: 1) Add a subscription to a biblio, or check a biblio which has one attached already. 2) Remove all items if there are any. 3) Apply patch. 4) Confirm that the 'Delete record' item is disabled in the list. 5) Attempt to 'Delete record', you should recieve an error message stating to delete all subscriptions before deleting record. 6) Sign off. Sponsored by: Lunds Universitetsbibliotek Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi> Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 128280 [details] [review] Bug 9565: (follow-up) Adapt batch record deletion tool Add a column "Subscriptions" to the batch deletion tools Add a link on the number of subscription to the search page with all the subscriptions of the record Add a button in the toolbar to select only biblio record without subscriptions The changes are only on display It is still possible to delete records that are attached to subscriptions from this tool (as it is possible for records with attached items) To test: 1) Go to the batch record deletion (in tools) 2) Select a list of record numbers (select some with one or more subscription) 3) Click on Continue 4) Check that there is no column named "Subscription" and that there is no button "Select without subscription" in the toolbar 5) Apply patch 6) Repeat steps 1 to 3 7a) Check that there is a column named "Subscription" fill with the number of subscriptions attached to the record 7b) Check that the link in the subscriptions column send you to the search page with the subscriptions linked to this record 7c) Check that there is a button "Select without subscription" in the toolbar that selects record with no subscription attached 8) Sign off Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 128281 [details] [review] Bug 9565: Use Koha::Biblio Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Nice one Marion. I have attached a follow-up to use Koha::Biblio instead of subroutines from C4. Also I am not sure the "without" links on top of the table are actually useful as it, I think they should work together: like you want to uncheck biblios that have items then those without subscriptions. Not considering blocker as it's the current behaviour. Pushed to master for 22.05, thanks to everybody involved 🦄 Pushed to 21.11.x for 21.11.01 Doesn't apply cleanly to 21.05. Please rebase if needed. Thanks! Created attachment 128764 [details] [review] Bug 9565: Use Koha::Biblio (rebase for 21.05.x) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (In reply to Andrew Fuerste-Henry from comment #28) > Doesn't apply cleanly to 21.05. Please rebase if needed. Thanks! The first 3 patch apply correctly. I attached the rebased version of the patch "Bug 9565: Use Koha::Biblio" I hope it will do. Created attachment 128832 [details] [review] Bug 9565: (follow-up) Adapt batch record deletion tool (rebase for 21.05.x) Add a column "Subscriptions" to the batch deletion tools Add a link on the number of subscription to the search page with all the subscriptions of the record Add a button in the toolbar to select only biblio record without subscriptions The changes are only on display It is still possible to delete records that are attached to subscriptions from this tool (as it is possible for records with attached items) To test: 1) Go to the batch record deletion (in tools) 2) Select a list of record numbers (select some with one or more subscription) 3) Click on Continue 4) Check that there is no column named "Subscription" and that there is no button "Select without subscription" in the toolbar 5) Apply patch 6) Repeat steps 1 to 3 7a) Check that there is a column named "Subscription" fill with the number of subscriptions attached to the record 7b) Check that the link in the subscriptions column send you to the search page with the subscriptions linked to this record 7c) Check that there is a button "Select without subscription" in the toolbar that selects record with no subscription attached 8) Sign off Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to 21.05.x for 21.05.08. Thanks! Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed. |