Bug 9099

Summary: 'Export today's checked in barcodes' always shows and might export an empty file
Product: Koha Reporter: Owen Leonard <oleonard>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, jonathan.druart, katrin.fischer, kyle.m.hall, veron
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:
Attachments: Bug 9099: WIP - Hide the export of today's checkins if none

Description Owen Leonard 2012-11-16 14:19:48 UTC
If a patron has no checked-in barcodes to export, Koha should not prompt to download an empty file. The pop-up window should instead give a message saying there are none.
Comment 1 Katrin Fischer 2015-01-06 19:47:21 UTC
The feature is in the patron account > More > Export today's checked in barcodes.
The problem still exists.
Comment 2 Jonathan Druart 2015-04-01 10:52:40 UTC
This could increase significantly all pages where this link is displayed.
I am not sure it is worth to do it.
Comment 3 Katrin Fischer 2015-04-01 12:05:39 UTC
Hm, could we always display the link, but fall back to a nice alert "no checkouts to export" after the link was clicked?
Comment 4 Jonathan Druart 2015-04-01 12:09:02 UTC
If the file is empty, I suppose the librarian will understand easily why it is empty, don't you think?
Comment 5 Katrin Fischer 2015-04-01 12:14:54 UTC
It would save some additional steps - saving and checking the file.  It would be nice, I suggest changing this to enh.
Comment 6 Katrin Fischer 2019-04-28 09:49:57 UTC
I still think some additional logic here would be nice.
Comment 7 Jonathan Druart 2019-04-28 21:01:30 UTC
Created attachment 88988 [details] [review]
Bug 9099: WIP - Hide the export of today's checkins if none

FIXME:
- Add POD
- Add tests

This patch is for discussion as I do not think it is ready for inclusion:
as the page is not reloaded/updated when a checkin is done, the link will stay hidden.