Bug 20979

Summary: Error message when deleting bib attached to order
Product: Koha Reporter: Donna <bwsdonna>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: amitddng135, bwsdonna, fridolin.somers, jonathan.druart, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 17893, 20977    
Bug Blocks:    
Attachments: Bug 20979: Fix confirm deletion popup when deleting a biblio
Bug 20979: Fix confirm deletion popup when deleting a biblio
Bug 20979: Fix confirm deletion popup when deleting a biblio
Bug 20979: Fix confirm deletion popup when deleting a biblio

Description Donna 2018-06-21 16:21:49 UTC
Discovered as a result of bug 20977.  When deleting an empty bib, error messages pops up "1 order(s) are using this record. You need order managing permissions to delete this record." even though user has superlibrarian permissions.  Prevents the deletion of the bib record.

Item was received, and in a closed basket, and closed budget. All items were deleted, but bib cannot be.
Comment 1 Jonathan Druart 2018-06-21 21:08:21 UTC
Created attachment 76248 [details] [review]
Bug 20979: Fix confirm deletion popup when deleting a biblio

When deleting an empty bib, error messages pops up "1 order(s) are
using this record. You need order managing permissions to delete this
record." even though user has superlibrarian permissions.  Prevents the
deletion of the bib record.
Comment 2 Jonathan Druart 2018-06-21 21:09:32 UTC
Maybe caused by bug 17893.
You need the patch from bug 20977 to test.
Comment 3 Katrin Fischer 2018-07-08 17:21:58 UTC
I think ultimately we should do something more clever here, like checking if the orders have all been received or cancelled before complaining. But this is a bug fix and as such perfect.
Comment 4 Katrin Fischer 2018-07-08 17:22:23 UTC
Created attachment 76777 [details] [review]
Bug 20979: Fix confirm deletion popup when deleting a biblio

When deleting an empty bib, error messages pops up "1 order(s) are
using this record. You need order managing permissions to delete this
record." even though user has superlibrarian permissions.  Prevents the
deletion of the bib record.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Martin Renvoize (ashimema) 2018-07-12 09:35:39 UTC
Created attachment 76877 [details] [review]
Bug 20979: Fix confirm deletion popup when deleting a biblio

When deleting an empty bib, error messages pops up "1 order(s) are
using this record. You need order managing permissions to delete this
record." even though user has superlibrarian permissions.  Prevents the
deletion of the bib record.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2018-07-12 09:39:01 UTC
Created attachment 76878 [details] [review]
Bug 20979: Fix confirm deletion popup when deleting a biblio

When deleting an empty bib, error messages pops up "1 order(s) are
using this record. You need order managing permissions to delete this
record." even though user has superlibrarian permissions.  Prevents the
deletion of the bib record.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize (ashimema) 2018-07-12 09:40:15 UTC
A trivial patch, looks good and tests good. Passing QA.
Comment 8 Nick Clemens (kidclamp) 2018-07-13 11:26:04 UTC
Awesome work all!

Pushed to master for 18.11
Comment 9 Martin Renvoize (ashimema) 2018-07-15 18:40:04 UTC
Pushed to 18.05.x for 18.05.02
Comment 10 Fridolin Somers 2018-07-26 07:34:25 UTC
Pushed to 17.11.x for 17.11.08
Comment 11 Fridolin Somers 2018-07-26 07:35:21 UTC
Depends on bug 20977 not in 17.05.x