Bug 9044 - Allow to select items on catalogue/detail.pl and trigger actions
Summary: Allow to select items on catalogue/detail.pl and trigger actions
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Julian Maurice
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 11475
  Show dependency treegraph
 
Reported: 2012-11-09 14:41 UTC by Julian Maurice
Modified: 2014-12-07 20:02 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 9044: Provide item selection in record detail page (staff client) (11.70 KB, patch)
2012-11-09 14:42 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 9044: Provide item selection in record detail page (staff client) (12.30 KB, patch)
2012-11-19 13:24 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 9044: Provide item selection in record detail page (staff client) (12.40 KB, patch)
2012-12-07 15:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9044: Provide item selection in record detail page (staff client) (12.16 KB, patch)
2013-01-22 09:24 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 9044 [Follow-up] Add a blank option + add missing 'for' attributes (3.95 KB, patch)
2013-03-21 12:17 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9044: Provide item selection in record detail page (staff client) (11.77 KB, patch)
2013-03-22 07:52 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 9044 [Follow-up] Add a blank option + add missing 'for' attributes (3.96 KB, patch)
2013-03-22 07:52 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 9044 [Follow-up] Add a blank option + add missing 'for' attributes (4.02 KB, patch)
2013-03-22 08:37 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 9044: QA followup (3.75 KB, patch)
2013-06-17 10:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9044: Change dropdown list into links list (6.61 KB, patch)
2013-07-02 14:06 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9044: Provide item selection in record detail page (staff client) (11.83 KB, patch)
2013-07-24 06:41 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9044 [Follow-up] Add a blank option + add missing 'for' attributes (4.02 KB, patch)
2013-07-24 06:41 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9044: QA followup (3.86 KB, patch)
2013-07-24 06:41 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 9044: Change dropdown list into links list (6.61 KB, patch)
2013-07-24 06:41 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9044: Provide item selection in record detail page (staff client) (12.06 KB, patch)
2013-09-23 07:20 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9044 [Follow-up] Add a blank option + add missing 'for' attributes (4.02 KB, patch)
2013-09-23 07:20 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9044: QA followup (3.92 KB, patch)
2013-09-23 07:21 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 9044: Change dropdown list into links list (6.61 KB, patch)
2013-09-23 07:21 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9044: Provide item selection in record detail page (staff client) (12.33 KB, patch)
2013-09-29 02:04 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9044 [Follow-up] Add a blank option + add missing 'for' attributes (4.09 KB, patch)
2013-09-29 02:05 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9044: QA followup (3.93 KB, patch)
2013-09-29 02:05 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9044: Change dropdown list into links list (6.86 KB, patch)
2013-09-29 02:05 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Screnshot, search filters for materials and barcode are broken. (25.03 KB, image/png)
2013-09-29 12:33 UTC, Katrin Fischer
Details
Bug 9044: Set the number of filters according to number of columns (1.59 KB, patch)
2013-09-30 07:04 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9044: Set the number of filters according to number of columns (1.69 KB, patch)
2013-09-30 21:47 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 9044: Provide item selection in record detail page (staff client) (12.50 KB, patch)
2013-10-03 10:10 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 9044 [Follow-up] Add a blank option + add missing 'for' attributes (4.15 KB, patch)
2013-10-03 10:12 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 9044: QA followup (3.99 KB, patch)
2013-10-03 10:12 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 9044: Change dropdown list into links list (6.92 KB, patch)
2013-10-03 10:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 9044: Set the number of filters according to number of columns (2.17 KB, patch)
2013-10-03 10:14 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2012-11-09 14:41:53 UTC
Some libraries with a high number of items per record sometimes want to modify a batch of items (not all items of this record at once). So this development add a checkboxes column for selecting items and trigger actions on them (currently only batch deletion and batch modification).
With bug 9034, this will allow filtering -> selecting -> batch processing items of a record quite quickly.
Comment 1 Julian Maurice 2012-11-09 14:42:23 UTC Comment hidden (obsolete)
Comment 2 Julian Maurice 2012-11-19 13:24:39 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2012-12-07 15:36:20 UTC Comment hidden (obsolete)
Comment 4 Marcel de Rooy 2013-01-20 17:19:12 UTC
Please resolve merge conflict on template.
Comment 5 Julian Maurice 2013-01-22 09:24:20 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2013-02-07 14:40:12 UTC
Owen, Could I have your opinion on this patch please?
Do you think it is a good idea to remove actions for items (delete and edit) from the toolbar?
Comment 7 Owen Leonard 2013-02-07 15:23:52 UTC
(In reply to comment #6)
> Do you think it is a good idea to remove actions for items (delete and edit)
> from the toolbar?

I don't think it's a good idea. I think there's no reason not to remove an option which may be in use by Koha users, and for those who want to quickly edit or delete all items it is fewer clicks than manually selecting from the table of holdings.

Other minor changes I would like to see: 

- Adding a blank option to the "action" menu so that (at least in English) 
  "Delete selected items" isn't the default.
- Add a "for" attribute to the "Action" label to make it clickable.
- Add a label to the "Open in new window" text to make it clickable.

Those could be handled in a follow-up, but I wouldn't like to see this pushed with the toolbar button options missing.
Comment 8 Katrin Fischer 2013-03-21 08:39:41 UTC
Julian, could you take care of Owen's comments please? Thx!
Comment 9 Julian Maurice 2013-03-21 12:17:36 UTC Comment hidden (obsolete)
Comment 10 Fridolin Somers 2013-03-22 07:52:09 UTC Comment hidden (obsolete)
Comment 11 Fridolin Somers 2013-03-22 07:52:55 UTC Comment hidden (obsolete)
Comment 12 Paul Poulain 2013-03-22 08:37:13 UTC
Patch tested with a sandbox, by Pierre Angot et Leila Arkab <tredok.pierre@gmail.com>
Comment 13 Paul Poulain 2013-03-22 08:37:29 UTC Comment hidden (obsolete)
Comment 14 Katrin Fischer 2013-06-16 19:19:12 UTC
Hm, testing this I have am a little worried about a few things in this approach:

1) These patches remove the batch edit and delete options from the Edit menu, but the system preference added is by default off. So we actually take away a feature with the update.

2) The interface seems not quite right to me. Instead of having to select an option from a pull down and then click on go, I think having 2 links instead would save one click and be less fiddly.

3) The first column has the little arrow for sorting, but sorting doesn't work, whether you have seleted checkboxes or not. Also if you activate the filters, it has an added search box that doesn't make sense for this column.

Failing for 1) and 3).

My personal opinion is that it would be nice to deal with it like with the "activate filters" option. So it's not a "all or nothing" option using the system preference as only switch, but also something people can choose to activate easily on demand.
Comment 15 Katrin Fischer 2013-06-16 19:21:08 UTC
5) Oh, before I forget: I had added the bug number to the database update when fixing the conflicts. Please add it when you do a follow-up.
Comment 16 Jonathan Druart 2013-06-17 10:16:15 UTC Comment hidden (obsolete)
Comment 17 Jonathan Druart 2013-06-17 10:17:03 UTC
(In reply to comment #14)
> Hm, testing this I have am a little worried about a few things in this
> approach:
> 
> 1) These patches remove the batch edit and delete options from the Edit
> menu, but the system preference added is by default off. So we actually take
> away a feature with the update.
> 
> 2) The interface seems not quite right to me. Instead of having to select an
> option from a pull down and then click on go, I think having 2 links instead
> would save one click and be less fiddly.
> 
> 3) The first column has the little arrow for sorting, but sorting doesn't
> work, whether you have seleted checkboxes or not. Also if you activate the
> filters, it has an added search box that doesn't make sense for this column.
> 
> Failing for 1) and 3).

1 and 3 fixed with the qa followup.

For 2, the idea is to add others actions in this drop-down list. So it will be difficult to deal with more than 2 links.

Back to Signed Off
Comment 18 Katrin Fischer 2013-06-17 10:23:34 UTC
What other actions do you have in mind? I think unless we really have another idea there would be no reason to overcomplicate the interface. Maybe we could ask Owen nicely to take a look.
Comment 19 Jonathan Druart 2013-06-17 10:27:18 UTC
(In reply to comment #18)
> What other actions do you have in mind?

No one for now :)
Comment 20 Katrin Fischer 2013-06-30 21:38:39 UTC
I think change the display when we actually have more options :)
Comment 21 Julian Maurice 2013-07-02 14:06:04 UTC Comment hidden (obsolete)
Comment 22 Julian Maurice 2013-07-02 14:09:54 UTC
Note that links are rebuild each time a checkbox is changed, so actions links point to valid URL and can be opened in a new window if your browser permit it (right click -> open in a new window)
Comment 23 Owen Leonard 2013-07-23 15:06:51 UTC
Applying: Bug 9044: Provide item selection in record detail page (staff client)
Applying: Bug 9044 [Follow-up] Add a blank option + add missing 'for' attributes
Applying: Bug 9044: QA followup
fatal: sha1 information is lacking or useless (installer/data/mysql/sysprefs.sql).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 9044: QA followup
Comment 24 Julian Maurice 2013-07-24 06:41:16 UTC Comment hidden (obsolete)
Comment 25 Julian Maurice 2013-07-24 06:41:29 UTC Comment hidden (obsolete)
Comment 26 Julian Maurice 2013-07-24 06:41:44 UTC Comment hidden (obsolete)
Comment 27 Julian Maurice 2013-07-24 06:41:55 UTC Comment hidden (obsolete)
Comment 28 Julian Maurice 2013-07-24 06:42:41 UTC
All patches rebased on master.
Comment 29 I'm just a bot 2013-09-18 11:09:41 UTC
Applying: Bug 9044: Provide item selection in record detail page (staff client)
Using index info to reconstruct a base tree...
M	catalogue/detail.pl
M	installer/data/mysql/sysprefs.sql
M	installer/data/mysql/updatedatabase.pl
M	koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref
M	koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging installer/data/mysql/sysprefs.sql
CONFLICT (content): Merge conflict in installer/data/mysql/sysprefs.sql
Auto-merging catalogue/detail.pl
Patch failed at 0001 Bug 9044: Provide item selection in record detail page (staff client)
The copy of the patch that failed is found in:
   /home/christopher/git/koha/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Comment 30 Julian Maurice 2013-09-23 07:20:41 UTC Comment hidden (obsolete)
Comment 31 Julian Maurice 2013-09-23 07:20:59 UTC Comment hidden (obsolete)
Comment 32 Julian Maurice 2013-09-23 07:21:14 UTC Comment hidden (obsolete)
Comment 33 Julian Maurice 2013-09-23 07:21:26 UTC Comment hidden (obsolete)
Comment 34 Julian Maurice 2013-09-23 07:21:47 UTC
All patches rebased on master
Comment 35 I'm just a bot 2013-09-24 05:33:17 UTC
Patch applied cleanly, go forth and signoff
Comment 36 Bernardo Gonzalez Kriegel 2013-09-29 02:04:50 UTC Comment hidden (obsolete)
Comment 37 Bernardo Gonzalez Kriegel 2013-09-29 02:05:03 UTC Comment hidden (obsolete)
Comment 38 Bernardo Gonzalez Kriegel 2013-09-29 02:05:14 UTC Comment hidden (obsolete)
Comment 39 Bernardo Gonzalez Kriegel 2013-09-29 02:05:25 UTC Comment hidden (obsolete)
Comment 40 Katrin Fischer 2013-09-29 12:33:34 UTC
Created attachment 21591 [details]
Screnshot, search filters for materials and barcode are broken.

I think this is very close to ready, but there is a problem with the search filters (see screenshot).
Comment 41 Katrin Fischer 2013-09-29 12:36:52 UTC
I verified the search filters show correctly for all columns on master.
 
Apart from that I found no problems - also tested with SeparateHoldings and
SeparateHoldingsBranch.

Please provide a follow-up!
Comment 42 Julian Maurice 2013-09-30 07:04:01 UTC Comment hidden (obsolete)
Comment 43 Julian Maurice 2013-09-30 07:05:35 UTC
Simple patch, easy to signoff :)
Comment 44 Bernardo Gonzalez Kriegel 2013-09-30 21:47:47 UTC Comment hidden (obsolete)
Comment 45 Katrin Fischer 2013-10-03 10:10:50 UTC
Created attachment 21745 [details] [review]
[PASSED QA] Bug 9044: Provide item selection in record detail page (staff client)

This patch add a column in the items table of catalogue/detail.pl that
contains checkboxes for item selection and a drop-down list of actions
that can be executed for the selection of items.
Currently available actions are:
- Delete selected items: redirect to batch items deletion
- Modify selected items: redirect to batch items modification
These actions replace the two menu entries corresponding to the same
action.
Item selection is only enabled if the new syspref
StaffDetailItemSelection is ON.
Actions are not displayed if user doesn't have the right permissions.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Further testing notes on last patch.

http://bugs.koha-community.org/show_bug.cgi?id=9055
Comment 46 Katrin Fischer 2013-10-03 10:12:06 UTC
Created attachment 21746 [details] [review]
[PASSED QA] Bug 9044 [Follow-up] Add a blank option + add missing 'for' attributes

Signed-off-by: Pierre Angot et Leila Arkab <tredok.pierre@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 47 Katrin Fischer 2013-10-03 10:12:16 UTC
Created attachment 21747 [details] [review]
[PASSED QA] Bug 9044: QA followup

1/ Remove filter and sort for the checkboxes column.
2/ Enable the pref by default.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 48 Katrin Fischer 2013-10-03 10:13:07 UTC
Created attachment 21748 [details] [review]
[PASSED QA] Bug 9044: Change dropdown list into links list

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
That's the one I sign.

Comment: At first I don't know where to find links, until
I selected an item.
Works as described. No koha-qa errors.

Solved merge conflict on updatedatabase.pl

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 49 Katrin Fischer 2013-10-03 10:14:53 UTC
Created attachment 21749 [details] [review]
[PASSED QA] Bug 9044: Set the number of filters according to number of columns

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Filters now shows correctly. No errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
This feature is a little controversial as it removes
the batch edit/delete options from the menu and moves them
to the item table, additionally controlled by a system
preference. Maybe later on, we can think about the UI a bit
more, but it works nicely.

Tested with.
- SeparateHoldings and SeparateHoldingsBranch activated/deactivated.
- Search filters.
- None, both, or one of the permissions.
Comment 50 Galen Charlton 2013-10-31 05:32:41 UTC
Pushed to master.  Thanks Julian!

I also pushed a follow-up that adds the toolbar menu items back.  From the commit message:

    My rationale: the question of the best UI for selecting items for
    batch operations is not yet settled.  Adding the ability to select
    items from the bib details page is indeed useful, but as currently
    implemented, it can hide the availability of the batch
    edit/deletion operations if no item is yet selected.  Although
    having both the toolbar items and the links that display when an
    item is selected is a bit redundant, for now I think we can live
    with that until we get more eyes on the UI.