[Bug 35469] New: Cannot create bookings without circulation permissions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Bug ID: 35469 Summary: Cannot create bookings without circulation permissions Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When attempting to place a booking on an item in the catalogue a user needs several permissions: 1 - Patron search permissions (see bug 29503) 2 - circulate: manage_bookings 3 - circulate_ circulate_remaning_permissions If you don't have the third, the loading of patrons seems to die on looking up checkouts via the api - this prevents the JS from enabling the 'Period' field for choosing booking dats and the booking cannot proceed. That third permission is not expected I think -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com Depends on| |29002 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29002 [Bug 29002] Add ability to book items ahead of time -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Ah, I see... The third permission is required as we need to lookup current checkouts for all items on the biblio so we can prevent a booking being added during the current checkout of an item. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Should we disable the 'Place booking' option if they don't have the circulate remaining permission.. or do we think the permission set on the checkouts api endpoint is set incorrectly in the first place? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Or... maybe we need a 'View current checkouts' additional sub-permission. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Could it be a new bookings endpoint, or a parameter on the bookings endpoint to include circulations? I think 'manage_bookings' covers the ability to place/update/delete bookings, so shouldn't require more than this. It looks like we fetch the checkouts, and turn them into bookings for the purposes here anyway - so seems it would make sense to have a 'current bookings' which includes the checkouts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=35468 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 159882 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159882&action=edit Bug 35469: Allow fetching checkouts on API This patch adds the 'manage_bookings' permission to allow fetching of checkouts on the API should the user have 'manage_bookings' but not have 'circulate_remaining_permissions' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 159883 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159883&action=edit Bug 35469: Unit test This patch adds a unit test to check that manage_bookings allows fetching of checkouts. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- I think this needs to adjust biblios.yaml as the call is: /api/v1/biblio/{id}/checkouts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 159996 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159996&action=edit Bug 35469: Add 'manage_bookings' subpermission to /checkouts This patch adds the 'manage_bookings' permission to allow fetching of checkouts on the API should the user have 'manage_bookings' but not have 'circulate_remaining_permissions' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 159997 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159997&action=edit Bug 35469: Add 'manage_bookings' permission to biblios/checkouts This patch adds the manage_bookings subpermission check to the biblios/{biblio_id}/checkouts endpoint and updates the corresponding unit test too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159882|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159883|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Good catch... I added a new patch, but also opted to leave the original here as I think it makes sense for consistency in the api permissions across these two similar endpoints. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Nick Clemens <nick@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=35469 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159996|0 |1 is obsolete| | Attachment #159997|0 |1 is obsolete| | --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 160005 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160005&action=edit Bug 35469: Add 'manage_bookings' subpermission to /checkouts This patch adds the 'manage_bookings' permission to allow fetching of checkouts on the API should the user have 'manage_bookings' but not have 'circulate_remaining_permissions' Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 160006 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160006&action=edit Bug 35469: Add 'manage_bookings' permission to biblios/checkouts This patch adds the manage_bookings subpermission check to the biblios/{biblio_id}/checkouts endpoint and updates the corresponding unit test too. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 160007 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160007&action=edit Bug 35469: (follow-up) Tidy Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #14 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Same, cannot create without patron's permission. I get 403 on /patrons. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #15 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I am not sure this is correct. It feels more like we need a dedicated route for bookings. Maybe we need an endpoint that will return the existing dates? That will simplify the JS code and make us move the logic to a Perl module. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Whilst this might be the longer term solution, I don't think we should focus on that here. We need a rethink of permissions in general as discussed a little on bug 25909. As for merging current checkouts into the bookings endpoints, I think that will add needless complexity into the bookings api controllers.. we'd need to also map fields for searching, joining, embedding etc etc to make that work as expected in all cases.. that is not a trivial piece of code to write or test. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looking here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #18 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- # Failed test 'exact match for JSON Pointer "/due_date"' # at /usr/share/koha/t/db_dependent/api/v1/checkouts.t line 215. # got: '2024-01-12T23:59:00+00:00' # expected: '2024-02-16T23:59:00+00:00' # Failed test 'exact match for JSON Pointer "/due_date"' # at /usr/share/koha/t/db_dependent/api/v1/checkouts.t line 245. # got: '2024-01-12T23:59:00+00:00' # expected: '2024-02-16T23:59:00+00:00' # Looks like you failed 2 tests of 108. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160005|0 |1 is obsolete| | Attachment #160006|0 |1 is obsolete| | Attachment #160007|0 |1 is obsolete| | --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 161490 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161490&action=edit Bug 35469: Add 'manage_bookings' permission to biblios/checkouts This patch adds the manage_bookings subpermission check to the biblios/{biblio_id}/checkouts endpoint and updates the corresponding unit test too. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 161491 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161491&action=edit Bug 35469: Add 'manage_bookings' subpermission to /checkouts This patch adds the 'manage_bookings' permission to allow fetching of checkouts on the API should the user have 'manage_bookings' but not have 'circulate_remaining_permissions' Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161490|0 |1 is obsolete| | --- Comment #21 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 161492 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161492&action=edit Bug 35469: Add 'manage_bookings' permission to biblios/checkouts This patch adds the manage_bookings subpermission check to the biblios/{biblio_id}/checkouts endpoint and updates the corresponding unit test too. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #22 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- If possible, no separate tidy patches. Applied it on first patch. Fix test? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161491|0 |1 is obsolete| | --- Comment #23 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 161639 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161639&action=edit Bug 35469: Add 'manage_bookings' subpermission to /checkouts This patch adds the 'manage_bookings' permission to allow fetching of checkouts on the API should the user have 'manage_bookings' but not have 'circulate_remaining_permissions' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161492|0 |1 is obsolete| | --- Comment #24 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 161640 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161640&action=edit Bug 35469: Add 'manage_bookings' permission to biblios/checkouts This patch adds the manage_bookings subpermission check to the biblios/{biblio_id}/checkouts endpoint and updates the corresponding unit test too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 --- Comment #25 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Weird, the tests pass for me.. and I was sure I'd run tidy prior to submitting these up. Anyway.. I've rebased my branch and squashed a tidy in. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161639|0 |1 is obsolete| | --- Comment #26 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 161641 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161641&action=edit Bug 35469: Add 'manage_bookings' subpermission to /checkouts This patch adds the 'manage_bookings' permission to allow fetching of checkouts on the API should the user have 'manage_bookings' but not have 'circulate_remaining_permissions' Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161640|0 |1 is obsolete| | --- Comment #27 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 161642 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161642&action=edit Bug 35469: Add 'manage_bookings' permission to biblios/checkouts This patch adds the manage_bookings subpermission check to the biblios/{biblio_id}/checkouts endpoint and updates the corresponding unit test too. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Marie <marie.hedbom@musikverket.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marie.hedbom@musikverket.se -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=35469 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161641|0 |1 is obsolete| | --- Comment #28 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 162644 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162644&action=edit Bug 35469: Add 'manage_bookings' subpermission to /checkouts This patch adds the 'manage_bookings' permission to allow fetching of checkouts on the API should the user have 'manage_bookings' but not have 'circulate_remaining_permissions' Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161642|0 |1 is obsolete| | --- Comment #29 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 162645 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162645&action=edit Bug 35469: Add 'manage_bookings' permission to biblios/checkouts This patch adds the manage_bookings subpermission check to the biblios/{biblio_id}/checkouts endpoint and updates the corresponding unit test too. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |24.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=35469 --- Comment #30 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable Version(s)|24.05.00 |24.05.00,23.11.04 released in| | --- Comment #31 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to stable |RESOLVED Resolution|--- |FIXED --- Comment #32 from Lucas Gass <lucas@bywatersolutions.com> --- Missing 23.05.x dependencies, no backport. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35469 Bug 35469 depends on bug 29002, which changed state. Bug 29002 Summary: Add ability to book items ahead of time https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29002 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org