Bug 37219

Summary: In OPAC item holds, separate copy number from radio button and add table configuration
Product: Koha Reporter: Sara Brown <sbrown>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: Signed Off --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: trivial    
Priority: P5 - low CC: jonathan.druart, marie-luce.laflamme, paul.derscheid, phil
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 37229    
Bug Blocks:    
Attachments: Bug 37219: In OPAC item holds, separate copy number from radio button and add table configuration
Bug 37219: In OPAC item holds, separate copy number from radio button and add table configuration
Bug 37219: In OPAC item holds, separate copy number from radio button and add table configuration
Bug 37219: In OPAC item holds, separate copy number from radio button and add table configuration
Bug 37219: In OPAC item holds, separate copy number from radio button and add table configuration
Bug 37219: In OPAC item holds, separate copy number from radio button and add table configuration
Bug 37219: (follow-up) Send copy number flag to template
Bug 37219: (follow-up) Send copy number flag to template

Description Sara Brown 2024-06-28 14:43:59 UTC
When placing an item-level hold in the OPAC, the column to select your item(s) using a radio button or checkbox is called "Copy number". This doesn't accurately describe what it is. The same column when placing a hold from the staff intranet is called "Hold", which makes more sense since you're selecting the item(s) you want to hold.
Comment 1 Phil Ringnalda 2024-07-01 18:12:25 UTC
It's still a bit confusing, but less confusing, if you use copy numbers, since then the column looks like:

( ) 1
( ) 1
( ) 2
( ) 2
( ) 4

which is probably nice if you are doing a item-level hold because of copy number. I never have done that in the OPAC, only for a particular enumchron or a particular home or holding branch, but maybe some people do.
Comment 2 Owen Leonard 2024-07-03 15:29:22 UTC
I propose this change:

- Split the radio button and copy number into two different columns
- Add column configuration to the table so that libraries that don't use copy numbers can hide the column
Comment 3 Owen Leonard 2024-07-03 16:20:59 UTC
Created attachment 168465 [details] [review]
Bug 37219: In OPAC item holds, separate copy number from radio button and add table configuration

This patch changes the way items are displayed during the process of
placing a single or multiple item-level holds in the OPAC. The
item-selection radio button is now in a separate column from copy
number, and the columns can be configured.

Note: This patch includes indentation changes, so ignore whitespace when
viewing the diff.

To test, apply the patch and restart services.

- If necessary, go to Administration -> Circulation and fine rules and
  enable item-level holds in one of the rules.
- Log in to the OPAC and start the process of placing a hold on a title
  which falls under your configured circulation rule.
- On the place hold page, click "Show more options" and "A specific
  item" to show the table of items.
- The radio buttons and copy numbers should appear in separate columns.
- Go to Administration -> Table settings -> OPAC -> opac_holds and
  change the table's configuration to hide one or more columns.
- Return to the OPAC holds process and confirm that the table reflects
  your configuration changes.
- Perform the same test with multiple holds (selecting multiple items in
  catalog search results).

Sponsored-by: Athens County Public Libraries
Comment 4 Phil Ringnalda 2024-07-05 18:31:12 UTC
Created attachment 168564 [details] [review]
Bug 37219: In OPAC item holds, separate copy number from radio button and add table configuration

This patch changes the way items are displayed during the process of
placing a single or multiple item-level holds in the OPAC. The
item-selection radio button is now in a separate column from copy
number, and the columns can be configured.

Note: This patch includes indentation changes, so ignore whitespace when
viewing the diff.

To test, apply the patch and restart services.

- If necessary, go to Administration -> Circulation and fine rules and
  enable item-level holds in one of the rules.
- Log in to the OPAC and start the process of placing a hold on a title
  which falls under your configured circulation rule.
- On the place hold page, click "Show more options" and "A specific
  item" to show the table of items.
- The radio buttons and copy numbers should appear in separate columns.
- Go to Administration -> Table settings -> OPAC -> opac_holds and
  change the table's configuration to hide one or more columns.
- Return to the OPAC holds process and confirm that the table reflects
  your configuration changes.
- Perform the same test with multiple holds (selecting multiple items in
  catalog search results).

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 5 Owen Leonard 2024-09-13 12:27:01 UTC
Created attachment 171455 [details] [review]
Bug 37219: In OPAC item holds, separate copy number from radio button and add table configuration

This patch changes the way items are displayed during the process of
placing a single or multiple item-level holds in the OPAC. The
item-selection radio button is now in a separate column from copy
number, and the columns can be configured.

Note: This patch includes indentation changes, so ignore whitespace when
viewing the diff.

To test, apply the patch and restart services.

- If necessary, go to Administration -> Circulation and fine rules and
  enable item-level holds in one of the rules.
- Log in to the OPAC and start the process of placing a hold on a title
  which falls under your configured circulation rule.
- On the place hold page, click "Show more options" and "A specific
  item" to show the table of items.
- The radio buttons and copy numbers should appear in separate columns.
- Go to Administration -> Table settings -> OPAC -> opac_holds and
  change the table's configuration to hide one or more columns.
- Return to the OPAC holds process and confirm that the table reflects
  your configuration changes.
- Perform the same test with multiple holds (selecting multiple items in
  catalog search results).

Sponsored-by: Athens County Public Libraries

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 6 Marcel de Rooy 2024-11-15 09:48:38 UTC
Created attachment 174551 [details] [review]
Bug 37219: In OPAC item holds, separate copy number from radio button and add table configuration

This patch changes the way items are displayed during the process of
placing a single or multiple item-level holds in the OPAC. The
item-selection radio button is now in a separate column from copy
number, and the columns can be configured.

Note: This patch includes indentation changes, so ignore whitespace when
viewing the diff.

To test, apply the patch and restart services.

- If necessary, go to Administration -> Circulation and fine rules and
  enable item-level holds in one of the rules.
- Log in to the OPAC and start the process of placing a hold on a title
  which falls under your configured circulation rule.
- On the place hold page, click "Show more options" and "A specific
  item" to show the table of items.
- The radio buttons and copy numbers should appear in separate columns.
- Go to Administration -> Table settings -> OPAC -> opac_holds and
  change the table's configuration to hide one or more columns.
- Return to the OPAC holds process and confirm that the table reflects
  your configuration changes.
- Perform the same test with multiple holds (selecting multiple items in
  catalog search results).

Sponsored-by: Athens County Public Libraries

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Katrin Fischer 2024-11-19 15:16:23 UTC
@Joubu can you please check if that is OK to push with the recent DT work and the work to come?
Comment 8 Jonathan Druart 2024-11-19 16:19:04 UTC
Pretty sure this does not work correctly.

If you have table's headers depending on syspref, you have to use bKohaColumnsUseNames or the column visibility won't work correctly.
Comment 9 Katrin Fischer 2024-11-19 16:22:15 UTC
Thanks, Joubu. Owen, can you please check?
Comment 10 Jonathan Druart 2024-11-20 09:10:04 UTC
This needs to be rebuilt on top of the other DataTables patches that are in the queue. Please ping me if needed.
Comment 11 Owen Leonard 2025-07-23 18:17:36 UTC Comment hidden (obsolete)
Comment 12 Marie-Luce Laflamme 2025-08-01 20:46:18 UTC
Patch doesn't apply.

The radio button now has its own "Choose" column, which is a nice change. Most of the settings in the OPAC-hold table seem to work fine for showing or hiding fields, except for one thing.
The 'Copy number' column doesn't appear, even when the setting is enabled and the items have a 952$t.

I created a test record in case it helps. Please let me know if you need any more information or if I can help with anything else.
Comment 13 Owen Leonard 2025-08-04 18:28:01 UTC
Created attachment 185110 [details] [review]
Bug 37219: In OPAC item holds, separate copy number from radio button and add table configuration

This patch changes the way items are displayed during the process of
placing a single or multiple item-level holds in the OPAC. The
item-selection radio button is now in a separate column from copy
number, and the columns can be configured.

Note: This patch includes indentation changes by the tidy script, so
ignore whitespace when viewing the diff.

The patch also includes some code changes to hide the copy number column
if it contains no data.

To test, apply the patch and restart services.

- If necessary, go to Administration -> Circulation and fine rules and
  enable item-level holds in one of the rules.
- Log in to the OPAC and start the process of placing a hold on a title
  which falls under your configured circulation rule.
- On the place hold page, click "Show more options" and "A specific
  item" to show the table of items.
- The radio buttons and copy numbers should appear in separate columns.
- Go to Administration -> Table settings -> OPAC -> opac_holds and
  change the table's configuration to hide one or more columns.
- Return to the OPAC holds process and confirm that the table reflects
  your configuration changes.
- Perform the same test with multiple holds (selecting multiple items in
  catalog search results).

Sponsored-by: Athens County Public Libraries
Comment 14 Owen Leonard 2025-08-04 18:28:04 UTC
Created attachment 185111 [details] [review]
Bug 37219: (follow-up) Send copy number flag to template

This patch corrects opac-reserve.pl so that copy number information will
be passed to the template.
Comment 15 Marie-Luce Laflamme 2025-08-08 14:16:25 UTC
Created attachment 185279 [details] [review]
Bug 37219: (follow-up) Send copy number flag to template

This patch corrects opac-reserve.pl so that copy number information will
be passed to the template.

Signed-off-by: Marie-Luce Laflamme <marie-luce.laflamme@inlibro.com>