Bug 19490

Summary: Add a 'holds' column to the Batch Item Modification Tool
Product: Koha Reporter: Kyle M Hall <kyle>
Component: Architecture, internals, and plumbingAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, lisettepalouse+koha, martin.renvoize, nick, severine.queune
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 22914, 24051    
Attachments: Bug 19490: Add a 'Holds' column to the items batchmodification tool
Bug 19490: Add a 'Holds' column to the items batchmodification tool
Bug 19490: (follow-up) Add tooltip to each row
Bug 19490: Add a 'Holds' column to the items batchmodification tool
Bug 19490: (follow-up) Add tooltip to each row
Bug 19490: Add a 'Holds' column to the items batchmodification tool
Bug 19490: (follow-up) Add tooltip to each row
Bug 19490: Add a 'Holds' column to the items batchmodification tool
Bug 19490: (follow-up) Add tooltip to each row
Bug 19490: (follow-up) Improve tooltip message and some tidying
Bug 19490: (follow-up) Improve tooltip message and some tidying

Description Kyle M Hall 2017-10-18 16:39:58 UTC
Some librarians would like to know the holds activity for items when using the batch modification tool. We should display a holds count column to the batch item modification tool that will show the number of holds on an item / holds for entire record
Comment 1 Nick Clemens 2018-05-14 21:00:47 UTC
Created attachment 75321 [details] [review]
Bug 19490: Add a 'Holds' column to the items batchmodification tool

To test:
1 - Add some items to bathc modification
2 - Note there is no indication fo holds
3 - Apply patch
4 - Reload and note you can see how many holds (or none)
5 - Note you can hide this column with css:
    #batchMod-edit .holds_count { display: none; }
6 - Note the column has a tooltip to indicate item vs. record holds
Comment 2 Owen Leonard 2018-05-22 17:20:31 UTC
> 6 - Note the column has a tooltip to indicate item vs. record holds

I think it would be very helpful if we could have a tooltip on the table cells too:

"0 item holds / 3 total holds"
Comment 3 Séverine Queune 2018-05-23 13:59:19 UTC
Created attachment 75489 [details] [review]
Bug 19490: Add a 'Holds' column to the items batchmodification tool

To test:
1 - Add some items to bathc modification
2 - Note there is no indication fo holds
3 - Apply patch
4 - Reload and note you can see how many holds (or none)
5 - Note you can hide this column with css:
    #batchMod-edit .holds_count { display: none; }
6 - Note the column has a tooltip to indicate item vs. record holds

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 4 Séverine Queune 2018-05-23 14:01:04 UTC
That's interesting !
Works fine for me.
A detail about css hiding : I had to use #tools_batchMod-edit .holds_count { display: none; }
Comment 5 Nick Clemens 2018-05-23 19:08:18 UTC
Created attachment 75516 [details] [review]
Bug 19490: (follow-up) Add tooltip to each row

To test:
1 - Run batch modification on some items
2 - Hover over the holds column
3 - Note the tool tip
4 - PLace some holds to verify combinations of item/record level holds
show appropriately
Comment 6 Séverine Queune 2018-05-24 12:12:26 UTC
Created attachment 75533 [details] [review]
Bug 19490: Add a 'Holds' column to the items batchmodification tool

To test:
1 - Add some items to bathc modification
2 - Note there is no indication fo holds
3 - Apply patch
4 - Reload and note you can see how many holds (or none)
5 - Note you can hide this column with css:
    #batchMod-edit .holds_count { display: none; }
6 - Note the column has a tooltip to indicate item vs. record holds

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 7 Séverine Queune 2018-05-24 12:12:28 UTC
Created attachment 75534 [details] [review]
Bug 19490: (follow-up) Add tooltip to each row

To test:
1 - Run batch modification on some items
2 - Hover over the holds column
3 - Note the tool tip
4 - PLace some holds to verify combinations of item/record level holds
show appropriately

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 8 Séverine Queune 2018-05-24 12:14:01 UTC
Just tested once more with follow-up, tooltip on each row is clear for me.
Comment 9 Jonathan Druart 2018-05-31 18:39:26 UTC
1. There are "Show/hide columns" links on top of the page, the new column is not taken into account.

2. Maybe we could improve the tooltip "Holds on this record: 0" => "No hold on this record"?

Failing QA for 1.
Comment 10 Nick Clemens 2018-09-26 14:38:29 UTC
Created attachment 79429 [details] [review]
Bug 19490: Add a 'Holds' column to the items batchmodification tool

To test:
1 - Add some items to bathc modification
2 - Note there is no indication fo holds
3 - Apply patch
4 - Reload and note you can see how many holds (or none)
5 - Note you can hide this column with css:
    #batchMod-edit .holds_count { display: none; }
6 - Note the column has a tooltip to indicate item vs. record holds

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 11 Nick Clemens 2018-09-26 14:38:32 UTC
Created attachment 79430 [details] [review]
Bug 19490: (follow-up) Add tooltip to each row

To test:
1 - Run batch modification on some items
2 - Hover over the holds column
3 - Note the tool tip
4 - PLace some holds to verify combinations of item/record level holds
show appropriately

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 12 Nick Clemens 2018-09-26 14:45:34 UTC
Rebasing

(In reply to Jonathan Druart from comment #9)
> 1. There are "Show/hide columns" links on top of the page, the new column is
> not taken into account.

This was intentional, there are two other columns at the start that cannot be hidden, this seemed appropriate for the holds info. I will attempt a followup

> 2. Maybe we could improve the tooltip "Holds on this record: 0" => "No hold
> on this record"?

Will offer a followup shortly.

> Failing QA for 1.
Comment 13 Katrin Fischer 2018-10-06 20:53:56 UTC
Created attachment 80170 [details] [review]
Bug 19490: Add a 'Holds' column to the items batchmodification tool

To test:
1 - Add some items to bathc modification
2 - Note there is no indication fo holds
3 - Apply patch
4 - Reload and note you can see how many holds (or none)
5 - Note you can hide this column with css:
    #batchMod-edit .holds_count { display: none; }
6 - Note the column has a tooltip to indicate item vs. record holds

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2018-10-06 20:54:01 UTC
Created attachment 80171 [details] [review]
Bug 19490: (follow-up) Add tooltip to each row

To test:
1 - Run batch modification on some items
2 - Hover over the holds column
3 - Note the tool tip
4 - PLace some holds to verify combinations of item/record level holds
show appropriately

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Nick Clemens 2018-10-17 13:06:50 UTC
Created attachment 80705 [details] [review]
Bug 19490: (follow-up) Improve tooltip message and some tidying
Comment 16 Nick Clemens 2018-10-17 13:47:28 UTC
Created attachment 80708 [details] [review]
Bug 19490: (follow-up) Improve tooltip message and some tidying
Comment 17 Nick Clemens 2018-11-05 14:57:55 UTC
Awesome work all!

Pushed to master for 18.11
Comment 18 Martin Renvoize 2018-11-16 12:23:02 UTC
Enhancement, will not be backported to 18.05.x series.
Comment 19 Jonathan Druart 2019-04-29 01:52:20 UTC
From
  commit e427cf5b3f3ded54dbc6899c149a2de3e8ab13ea
  Bug 19490: Add a 'Holds' column to the items batchmodification tool

This following line:
+            $this_row{item_holds}   = Koha::Holds->search( itemnumber => $itemnumber )->count;

displays a DBIC warning:
[Mon Apr 29 01:49:32.831375 2019] [cgi:error] [pid 17243] [client 192.168.50.1:42814] AH01215: [Mon Apr 29 01:49:32 2019] batchMod.pl: DBIx::Class::ResultSet::search_rs(): search( %condition ) is deprecated, use search( \\%condition ) instead at /home/vagrant/kohaclone/Koha/Objects.pm line 136: /home/vagrant/kohaclone/tools/batchMod.pl, referer: http://pro.kohadev.org/cgi-bin/koha/tools/batchMod.pl

Must be ->search({ itemnumber => $itemnumber })->count
Comment 20 Jonathan Druart 2019-11-18 10:20:27 UTC
(In reply to Jonathan Druart from comment #19)
> From
>   commit e427cf5b3f3ded54dbc6899c149a2de3e8ab13ea
>   Bug 19490: Add a 'Holds' column to the items batchmodification tool
> 
> This following line:
> +            $this_row{item_holds}   = Koha::Holds->search( itemnumber =>
> $itemnumber )->count;
> 
> displays a DBIC warning:
> [Mon Apr 29 01:49:32.831375 2019] [cgi:error] [pid 17243] [client
> 192.168.50.1:42814] AH01215: [Mon Apr 29 01:49:32 2019] batchMod.pl:
> DBIx::Class::ResultSet::search_rs(): search( %condition ) is deprecated, use
> search( \\%condition ) instead at /home/vagrant/kohaclone/Koha/Objects.pm
> line 136: /home/vagrant/kohaclone/tools/batchMod.pl, referer:
> http://pro.kohadev.org/cgi-bin/koha/tools/batchMod.pl
> 
> Must be ->search({ itemnumber => $itemnumber })->count

See bug 24051.