Bug 32711

Summary: Add biblio details to trusted self-checkout modal
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: OPACAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: CLOSED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: enhancement    
Priority: P5 - low CC: david, fridolin.somers
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:
Bug Depends on: 30979    
Bug Blocks:    
Attachments: Bug 32711: Add biblio details to modal
Bug 32711: Add 'public_read_list' appropriately
Bug 32711: Add biblio details to modal
Bug 32711: Add 'public_read_list' appropriately
Bug 32711: Add biblio details to modal
Bug 32711: Add 'public_read_list' appropriately
Bug 32711: Fix biblio embeds
Bug 32711: Add biblio details to modal
Bug 32711: Add 'public_read_list' appropriately
Bug 32711: Fix biblio embeds
Bug 32711: Add biblio details to modal
Bug 32711: Add 'public_read_list' appropriately
Bug 32711: Fix biblio embeds
Bug 32711: Add biblio details to modal
Bug 32711: Add 'public_read_list' appropriately
Bug 32711: Fix biblio embeds

Description Martin Renvoize (ashimema) 2023-01-24 15:26:01 UTC
We should add further biblio details to the summary table that appears in the OPAC trusted self-checkout modal feature.

Title and callnumber for example
Comment 1 Martin Renvoize (ashimema) 2023-01-24 15:27:22 UTC
Created attachment 145618 [details] [review]
Bug 32711: Add biblio details to modal

This patch adds biblio details to the self-checkout modal. As part of
this we add 'biblio' to the x-koha-embed option on the public items
endpoint, clone the js-biblio-format include from the staff client
adapting it slightly for OPAC use along the way and also import
escape_str and escapeHtml from staff to opac too.
Comment 2 Martin Renvoize (ashimema) 2023-01-24 15:27:27 UTC
Created attachment 145619 [details] [review]
Bug 32711: Add 'public_read_list' appropriately

We're exposing biblio (and thus biblioitem) to the public API now and as
such we need to explisitely list which fields to include in the response
when called on teh public api.
Comment 3 David Nind 2023-01-28 19:07:24 UTC
Created attachment 145787 [details] [review]
Bug 32711: Add biblio details to modal

This patch adds biblio details to the self-checkout modal. As part of
this we add 'biblio' to the x-koha-embed option on the public items
endpoint, clone the js-biblio-format include from the staff client
adapting it slightly for OPAC use along the way and also import
escape_str and escapeHtml from staff to opac too.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2023-01-28 19:07:29 UTC
Created attachment 145788 [details] [review]
Bug 32711: Add 'public_read_list' appropriately

We're exposing biblio (and thus biblioitem) to the public API now and as
such we need to explisitely list which fields to include in the response
when called on teh public api.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2023-01-28 19:30:14 UTC
This is a nice enhancement to this feature!

The only thing I noticed is that if an item doesn't have a call number (maybe not an issue for production libraries?), then it displays "null" in the call number column.

Maybe this could be better displayed as either just an empty cell or as "-"?

Testing notes (using KTD):
1. Apply bug 30979, updatedatabase, flush_memcached, restart_all.
2. Enable OpacTrustedCheckout system preference.
3. Go to the OPAC home page.
4. Login as a patron (in this case I used koha).
5. Click the "Self checkout" option after Cart and Lists.
6. A window pops up asking you to enter a barcode.
7. Enter a barcode for an item that is available, for example: 39999000006094
   ==> Message should say: "Item '39999000006094' was checked out".
   ==> Next is an input box to enter another barcode.
   ==> The table listing items checked has columns for Barcode and Due date.
   ==> And then there are Submit and Close buttons at the bottom.
8. Apply the patches for this bug, flush_memcached and restart_all.
9. Repeat steps 5-7 and checkout another item, for example: 39999000011418
   ==> The table listing items checked out now has two additional columns - Title and Call number.
Comment 6 Katrin Fischer 2023-03-04 12:57:55 UTC
Moving this to BLOCKED for now as we are waiting for SO on the dependent bug 30979
Comment 7 Martin Renvoize (ashimema) 2023-05-10 12:19:07 UTC
Created attachment 150984 [details] [review]
Bug 32711: Add biblio details to modal

This patch adds biblio details to the self-checkout modal. As part of
this we add 'biblio' to the x-koha-embed option on the public items
endpoint, clone the js-biblio-format include from the staff client
adapting it slightly for OPAC use along the way and also import
escape_str and escapeHtml from staff to opac too.

Signed-off-by: Silvia Meakins <smeakins@eso.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Martin Renvoize (ashimema) 2023-05-10 12:19:10 UTC
Created attachment 150985 [details] [review]
Bug 32711: Add 'public_read_list' appropriately

We're exposing biblio (and thus biblioitem) to the public API now and as
such we need to explisitely list which fields to include in the response
when called on the public api.

Signed-off-by: Silvia Meakins <smeakins@eso.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Martin Renvoize (ashimema) 2023-05-10 12:19:12 UTC
Created attachment 150986 [details] [review]
Bug 32711: Fix biblio embeds

We need to drop the embed part of the args we pass to biblioitem else we end
up with some very strange behaviours on the acquisitions endpoint.

Signed-off-by: Silvia Meakins <smeakins@eso.org>
Comment 10 Martin Renvoize (ashimema) 2023-05-16 09:58:20 UTC
Created attachment 151262 [details] [review]
Bug 32711: Add biblio details to modal

This patch adds biblio details to the self-checkout modal. As part of
this we add 'biblio' to the x-koha-embed option on the public items
endpoint, clone the js-biblio-format include from the staff client
adapting it slightly for OPAC use along the way and also import
escape_str and escapeHtml from staff to opac too.

Signed-off-by: Silvia Meakins <smeakins@eso.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Martin Renvoize (ashimema) 2023-05-16 09:58:23 UTC
Created attachment 151263 [details] [review]
Bug 32711: Add 'public_read_list' appropriately

We're exposing biblio (and thus biblioitem) to the public API now and as
such we need to explisitely list which fields to include in the response
when called on the public api.

Signed-off-by: Silvia Meakins <smeakins@eso.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 12 Martin Renvoize (ashimema) 2023-05-16 09:58:25 UTC
Created attachment 151264 [details] [review]
Bug 32711: Fix biblio embeds

We need to drop the embed part of the args we pass to biblioitem else we end
up with some very strange behaviours on the acquisitions endpoint.

Signed-off-by: Silvia Meakins <smeakins@eso.org>
Comment 13 Martin Renvoize (ashimema) 2023-06-28 13:05:27 UTC
Created attachment 152800 [details] [review]
Bug 32711: Add biblio details to modal

This patch adds biblio details to the self-checkout modal. As part of
this we add 'biblio' to the x-koha-embed option on the public items
endpoint, clone the js-biblio-format include from the staff client
adapting it slightly for OPAC use along the way and also import
escape_str and escapeHtml from staff to opac too.

Signed-off-by: Silvia Meakins <smeakins@eso.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 14 Martin Renvoize (ashimema) 2023-06-28 13:05:30 UTC
Created attachment 152801 [details] [review]
Bug 32711: Add 'public_read_list' appropriately

We're exposing biblio (and thus biblioitem) to the public API now and as
such we need to explisitely list which fields to include in the response
when called on the public api.

Signed-off-by: Silvia Meakins <smeakins@eso.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 15 Martin Renvoize (ashimema) 2023-06-28 13:05:33 UTC
Created attachment 152802 [details] [review]
Bug 32711: Fix biblio embeds

We need to drop the embed part of the args we pass to biblioitem else we end
up with some very strange behaviours on the acquisitions endpoint.

Signed-off-by: Silvia Meakins <smeakins@eso.org>
Comment 16 Martin Renvoize (ashimema) 2023-07-14 11:32:30 UTC
Created attachment 153468 [details] [review]
Bug 32711: Add biblio details to modal

This patch adds biblio details to the self-checkout modal. As part of
this we add 'biblio' to the x-koha-embed option on the public items
endpoint, clone the js-biblio-format include from the staff client
adapting it slightly for OPAC use along the way and also import
escape_str and escapeHtml from staff to opac too.

Signed-off-by: Silvia Meakins <smeakins@eso.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 17 Martin Renvoize (ashimema) 2023-07-14 11:32:33 UTC
Created attachment 153469 [details] [review]
Bug 32711: Add 'public_read_list' appropriately

We're exposing biblio (and thus biblioitem) to the public API now and as
such we need to explisitely list which fields to include in the response
when called on the public api.

Signed-off-by: Silvia Meakins <smeakins@eso.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 18 Martin Renvoize (ashimema) 2023-07-14 11:32:35 UTC
Created attachment 153470 [details] [review]
Bug 32711: Fix biblio embeds

We need to drop the embed part of the args we pass to biblioitem else we end
up with some very strange behaviours on the acquisitions endpoint.

Signed-off-by: Silvia Meakins <smeakins@eso.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 19 Tomás Cohen Arazi (tcohen) 2023-07-24 17:03:22 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 20 Fridolin Somers 2023-08-04 02:09:58 UTC
 Depends on Bug 30979 not in 23.05.x