[Bug 24232] New: Deleting a bib record after attaching the last item to another bib
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 Bug ID: 24232 Summary: Deleting a bib record after attaching the last item to another bib Change sponsored?: --- Product: Koha Version: 19.05 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Cataloging Assignee: tomascohen@gmail.com Reporter: kelly@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Bug 15496 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15496 Now gives the ability to delete the bib if the item you are attaching to another bib is the last item on the record. The code states that the permission needed is Edit Catalogue, however, when this process is done, the API is making a call and not getting the right signal (or something). Upon working on this, it seems that a librarian would need to have the Overarching Permission in the Admin module to perform this action. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15496 CC| |jonathan.druart@bugs.koha-c | |ommunity.org Severity|minor |normal Version|19.05 |master Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15496 [Bug 15496] Delete bibliographic record after moving last item to another record(s) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 96388 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96388&action=edit Bug 24232: Regression tests This patch enhances the tests for the DELETE /biblios/:biblio_id endpoint so more fine grained permissions are tested. It highlights the fact that the required permissions defined on the spec are not correcttly defined. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => FAIL: Tests fail because the user (that now has subpermissions only) does not have enough permissions for a non-existent subpermission -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 96389 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96389&action=edit Bug 24232: Fix required permissions in DELETE /biblios/:biblio_id This patch fixes the required permissions defined on the spec for the mentioned endpoint. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => FAIL: Tests fail due to badly defined permissions 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! Notice parameters: edit_catelogue didn't exist 5. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Kelly McElligott from comment #0)
Bug 15496 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15496 Now gives the ability to delete the bib if the item you are attaching to another bib is the last item on the record. The code states that the permission needed is Edit Catalogue, however, when this process is done, the API is making a call and not getting the right signal (or something).
Upon working on this, it seems that a librarian would need to have the Overarching Permission in the Admin module to perform this action.
Thanks for reporting it Kelly, it wasn't straightforward to detect the error! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #4 from Kelly McElligott <kelly@bywatersolutions.com> --- Can the test plan be more simplistic for users? 1. Have a staff member with Edit Catalog permissions (Edit catalog (Modify bibliographic/holdings data) (edit_catalogue)) and within the Edit Catalog permissions, Edit Items. 2. Find a bib record with 1 item. 3. Attach that 1 item to another bib record. 4. Koha gives an error when staff tries to delete the record. 5. Apply patch 6. Go through steps 1-3. 7. Success. Staff can attach an item to a record and successfully delete the itemless bib in the same step. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96389|0 |1 is obsolete| | --- Comment #5 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 96393 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96393&action=edit Bug 24232: Fix required permissions in DELETE /biblios/:biblio_id This patch fixes the required permissions defined on the spec for the mentioned endpoint. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => FAIL: Tests fail due to badly defined permissions 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! Notice parameters: edit_catelogue didn't exist 5. Sign off :-D Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Tomas, Kelly, The script moveitem.pl requires editcatalogue => 'edit_items', the deletion of a biblio editcatalogue => edit_catalogue. Even if weird I guess we could have a librarian with edit_items but edit_catalogue. I think we should show delete-biblio-btn if CAN_user_editcatalogue_edit_catalogue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96398 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96398&action=edit Bug 24232: Hide the "Delete biblio" if permission edit_catalogue not set The script moveitem.pl requires editcatalogue => 'edit_items', the deletion of a biblio editcatalogue => edit_catalogue. Even if weird I guess we could have a librarian with edit_items but edit_catalogue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Note that the message is meaningless: "The record has X attached items" is only displayed when X=0. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #6)
Tomas, Kelly,
The script moveitem.pl requires editcatalogue => 'edit_items', the deletion of a biblio editcatalogue => edit_catalogue. Even if weird I guess we could have a librarian with edit_items but edit_catalogue.
It is not that weird. It happens in academic institutions where there's central cataloguing and the rest of the branches just add their items.
I think we should show delete-biblio-btn if CAN_user_editcatalogue_edit_catalogue.
Good idea! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Kelly McElligott from comment #4)
Can the test plan be more simplistic for users?
1. Have a staff member with Edit Catalog permissions (Edit catalog (Modify bibliographic/holdings data) (edit_catalogue)) and within the Edit Catalog permissions, Edit Items.
2. Find a bib record with 1 item.
3. Attach that 1 item to another bib record.
4. Koha gives an error when staff tries to delete the record.
5. Apply patch
6. Go through steps 1-3.
7. Success. Staff can attach an item to a record and successfully delete the itemless bib in the same step.
Thanks for that, Kelly. Can you retest with Jonathan's follow-up? When submitting the signed patches to Bugzilla, please specify that it is 3 patches! (see the attachments block here) and don't forget to mark it Signed Off. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #8)
Note that the message is meaningless: "The record has X attached items" is only displayed when X=0.
Can you file a separate bug with that? I was dealing with wrong API permissions here! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96388|0 |1 is obsolete| | --- Comment #12 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 96434 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96434&action=edit Bug 24232: Regression tests This patch enhances the tests for the DELETE /biblios/:biblio_id endpoint so more fine grained permissions are tested. It highlights the fact that the required permissions defined on the spec are not correcttly defined. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => FAIL: Tests fail because the user (that now has subpermissions only) does not have enough permissions for a non-existent subpermission Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96393|0 |1 is obsolete| | --- Comment #13 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 96435 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96435&action=edit Bug 24232: Fix required permissions in DELETE /biblios/:biblio_id This patch fixes the required permissions defined on the spec for the mentioned endpoint. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => FAIL: Tests fail due to badly defined permissions 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! Notice parameters: edit_catelogue didn't exist 5. Sign off :-D Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96398|0 |1 is obsolete| | --- Comment #14 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 96436 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96436&action=edit Bug 24232: Hide the "Delete biblio" if permission edit_catalogue not set The script moveitem.pl requires editcatalogue => 'edit_items', the deletion of a biblio editcatalogue => edit_catalogue. Even if weird I guess we could have a librarian with edit_items but edit_catalogue. Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #15 from Kelly McElligott <kelly@bywatersolutions.com> --- Permissions: If staff member has Edit Catalog and Edit Items, this process can be done. If a staff member has Edit Items but not Edit Catalog, they can still attach the item, however the option to delete is not given. If a staff member has only Edit Catalog (and not Edit Items), the option is not there to Attach an Item. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 Kelly McElligott <kelly@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96434|0 |1 is obsolete| | Attachment #96435|0 |1 is obsolete| | Attachment #96436|0 |1 is obsolete| | --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96455 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96455&action=edit Bug 24232: Regression tests This patch enhances the tests for the DELETE /biblios/:biblio_id endpoint so more fine grained permissions are tested. It highlights the fact that the required permissions defined on the spec are not correcttly defined. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => FAIL: Tests fail because the user (that now has subpermissions only) does not have enough permissions for a non-existent subpermission Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96456 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96456&action=edit Bug 24232: Fix required permissions in DELETE /biblios/:biblio_id This patch fixes the required permissions defined on the spec for the mentioned endpoint. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => FAIL: Tests fail due to badly defined permissions 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! Notice parameters: edit_catelogue didn't exist 5. Sign off :-D Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96457 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96457&action=edit Bug 24232: Hide the "Delete biblio" if permission edit_catalogue not set The script moveitem.pl requires editcatalogue => 'edit_items', the deletion of a biblio editcatalogue => edit_catalogue. Even if weird I guess we could have a librarian with edit_items but edit_catalogue. Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|20.05.00 |20.05.00, 19.11.02 released in| | --- Comment #20 from Joy Nelson <joy@bywatersolutions.com> --- Pushed to 19.11.x branch for 19.11.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 --- Comment #21 from Tomás Cohen Arazi <tomascohen@gmail.com> --- We should rename the bug for something like 'Wrong permissions...' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |lucas@bywatersolutions.com --- Comment #22 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 19.05.x for 19.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24232 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Summary|Deleting a bib record after |Fix permissions for |attaching the last item to |deleting a bib record after |another bib |attaching the last item to | |another bib -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org