Bug 23184

Summary: Export/bibs/holdings settings unclear for exporting bibs without any holdings
Product: Koha Reporter: Donna <bwsdonna>
Component: ToolsAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P3 CC: b.pastern4k, carnold, m.de.rooy, mkstephens, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00
Circulation function:
Attachments: Bug 23184: Don't select branches for export by default
Bug 23184: Don't select branches for export by default
Bug 23184: Don't select branches for export by default

Description Donna 2019-06-21 14:35:00 UTC
By default, Koha will not export bibs without items as the "owned by libraries" check boxes are selected.

This is unclear to users.  If I upload a file of bibs to export, and don't uncheck the library boxes, the resulting mrc file will only contain records that have items, all bib records without items will not be included.  

The check boxes should either be empty by default, or a clarification note should be added stating that itemless bibs will not be exported.
Comment 1 Katrin Fischer 2019-08-11 11:24:15 UTC
We get quite some support requests about this. If you want to export records that don't have items (electronic resources, serials, set records) you need to explicitly uncheck the already checked branches.

From the feedback we receive in support, I'd suggest that we uncheck all branches by default. This means by default you export all records, unless you limit your export. Which seems more logical.

I've taken a look at the logic of the script but got quite confused, some help changing this would be appreciated!
Comment 2 Cori Lynn Arnold 2019-10-29 19:10:29 UTC
This is *bug* even if that box is checked and there are no items, the bibliographic record *should* be exported.
Comment 3 Cori Lynn Arnold 2019-10-29 19:10:45 UTC
*** Bug 23921 has been marked as a duplicate of this bug. ***
Comment 4 Nick Clemens (kidclamp) 2019-11-04 12:49:01 UTC
Created attachment 95002 [details] [review]
Bug 23184: Don't select branches for export by default

This patch changes the include to require passing "selectall=1" to select all items

This include is only used in this page, so changes should not have side effects
git grep "branch-selector\.inc"

This patch also corrects a mismatch in the class names

To test:
1 - Browse to Tools->Export data
2 - Note all branches are selected
3 - Note this will exclude records wiuthout items if you click 'Export bibiographic records'
4 - Apply patch
5 - Visit page again
6 - Note no branches are selected by default
7 - Confirm 'Select all/Clear all' still work
8 - Note record with no items are exported by default now
Comment 5 Myka Kennedy Stephens 2019-11-20 01:31:54 UTC
Created attachment 95590 [details] [review]
Bug 23184: Don't select branches for export by default

This patch changes the include to require passing "selectall=1" to select all items

This include is only used in this page, so changes should not have side effects
git grep "branch-selector\.inc"

This patch also corrects a mismatch in the class names

To test:
1 - Browse to Tools->Export data
2 - Note all branches are selected
3 - Note this will exclude records wiuthout items if you click 'Export bibiographic records'
4 - Apply patch
5 - Visit page again
6 - Note no branches are selected by default
7 - Confirm 'Select all/Clear all' still work
8 - Note record with no items are exported by default now

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Comment 6 Myka Kennedy Stephens 2019-11-20 01:32:26 UTC
Patch works as expected/described.
Comment 7 Marcel de Rooy 2019-11-21 07:51:53 UTC
Created attachment 95647 [details] [review]
Bug 23184: Don't select branches for export by default

This patch changes the include to require passing "selectall=1" to select all items

This include is only used in this page, so changes should not have side effects
git grep "branch-selector\.inc"

This patch also corrects a mismatch in the class names

To test:
1 - Browse to Tools->Export data
2 - Note all branches are selected
3 - Note this will exclude records wiuthout items if you click 'Export bibiographic records'
4 - Apply patch
5 - Visit page again
6 - Note no branches are selected by default
7 - Confirm 'Select all/Clear all' still work
8 - Note record with no items are exported by default now

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Marcel de Rooy 2019-11-21 07:54:55 UTC
I think this could still use an updated description, but that would cause a string change during string freeze ;)

Change:
With items owned by the following libraries

To:
Only include records having items from selected libraries

Or something in that direction ?
Comment 9 Martin Renvoize (ashimema) 2019-11-21 11:36:35 UTC
Nice work!

Pushed to master for 19.11.00
Comment 10 Katrin Fischer 2019-12-11 07:26:01 UTC
*** Bug 24210 has been marked as a duplicate of this bug. ***