Bug 14180

Summary: Make "Always show checkouts immediately" a global setting
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: CirculationAssignee: Lucas Gass <lucas>
Status: Patch doesn't apply --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: andrewfh, bwsdonna, edischer, gmcharlt, indradg, kebliss, kelly, kkrueger, kyle.m.hall, laura, lucas, marie-luce.laflamme, marjorie.barry-vila, michaela.sieber, nick, sally.healey, severine.queune, vimalibre
Version: master   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13196
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14180: Perltidy
Bug 14180: Add AlwaysLoadCheckoutsTable system preference
Bug 14180: Add option to always load the issues table
Bug 14180: Perltidy
Bug 14180: Add AlwaysLoadCheckoutsTable system preference
Bug 14180: Add option to always load the issues table
Bug 14180: Perltidy

Description Katrin Fischer 2015-05-11 12:32:06 UTC
Right now the checkbox is unchecked by default and your setting will be kept during the session. 

Several libraries have asked to check the checkbox permanently, as it's annoying to redo the checkbox every morning or even several times during the day. 

One of the librarians reporting this is relying on a screen reader and braille line - which makes the task of rechecking the checkbox in order to be able to read the checkouts even more tedious.
Comment 1 Owen Leonard 2015-05-11 12:56:26 UTC
(In reply to Katrin Fischer from comment #0)

> Several libraries have asked to check the checkbox permanently, as it's
> annoying to redo the checkbox every morning or even several times during the
> day. 

I thought Bug 13196 fixed this?
Comment 2 Katrin Fischer 2015-05-11 13:01:30 UTC
Hi Owen, thx for the comment! I have left a comment on the other bug - it's not in 3.18.x and marking ths see also for now to see if it fixes the problem for the library.
Comment 3 Katrin Fischer 2015-05-13 08:50:31 UTC
I realized that the patch Owen pointed to is already in 3.18, but this is still a problem to the library - maybe because of restrictive cookie settings? In general it would be nice if there was an option to just always load and get rid of the checkbox for some libraires.
Comment 4 Agnes Rivers-Moore 2015-08-19 18:07:39 UTC
I would like a global preference to turn "always show checkouts" on or off.
It is not something we would want to select daily or per session or per staff person.

There is also an extra row below "specify due date" in checkout that reports the barcode that was last checked out.
If "always show" is turned on - this is no longer needed, as the information is displayed twice.

I would wish to have that associated with the "Always show" function so that it only appears if "always show" is turned off.
It uses up screen space we would rather use to see the last several items we checked out - and there is already room for only one or two rows to show unless the screen resolution is dialed up.
Comment 5 vimal kumar 2016-02-05 04:42:58 UTC
"Always show checkouts immediately" is an annoying feature for library professionals in circulation desk. This feature is against the "Five Laws of Library Science" Save the Time of the reader!!
Comment 6 Owen Leonard 2016-02-05 13:16:27 UTC
Which reader do you want to save time for? The reader who wants to see the list of checkouts  right away or the reader who wants to have the page load quickly when there are hundreds of checkouts? The point of this bug is to make a new preference so you can have it either leave things the way they are now or return them to the way things were before the changes made by Bug 12550. A preference is the only way to give options to the various needs different librarians have expressed.
Comment 7 vimal kumar 2016-02-05 16:34:59 UTC
(In reply to Owen Leonard from comment #6)
> Which reader do you want to save time for? The reader who wants to see the
> list of checkouts  right away or the reader who wants to have the page load
> quickly when there are hundreds of checkouts? The point of this bug is to
> make a new preference so you can have it either leave things the way they
> are now or return them to the way things were before the changes made by Bug
> 12550. A preference is the only way to give options to the various needs
> different librarians have expressed.

After check out, library professionals have the tendency to check the list of books checked out. If the list hide , they have to click on the checkbox of ("Always show checkouts immediately").

when the library professional open Check out of a particular user, he has to click on "Always show checkouts immediately" option. this process is time consuming when good number of reader in que to check out the books.
Comment 8 Owen Leonard 2016-02-05 16:46:17 UTC
(In reply to vimal kumar from comment #7)

> when the library professional open Check out of a particular user, he has to
> click on "Always show checkouts immediately" option. this process is time
> consuming

It sounds to me like this bug is exactly what you want: A way to make it so that "Always show checkouts immediately" is globally enabled without a checkbox.
Comment 9 Galen Charlton 2016-06-13 13:55:58 UTC
(In reply to Agnes Rivers-Moore from comment #4)
> I would wish to have that associated with the "Always show" function so that
> it only appears if "always show" is turned off.
> It uses up screen space we would rather use to see the last several items we
> checked out - and there is already room for only one or two rows to show
> unless the screen resolution is dialed up.

A patch implementing this can be found at http://git.esilibrary.com/?p=koha-equinox.git;a=commitdiff;h=6d63573393b911444db599b1b2e2d5c680ee5a15. Perhaps this should be spun off into a separate bug?
Comment 10 Séverine Queune 2017-11-06 17:42:39 UTC
We added this code on 'IntranetUserJS' syspref and it works perfectly for us :)
(Found on Biblibre's documentation)


$(document).ready(function() {
 
if ( typeof script !== 'undefined' && ! $.cookie("issues-table-load-immediately-" + script) ) {
    $.cookie("issues-table-load-immediately-" + script, true, { expires: 365 });
}
 
});
Comment 11 Katrin Fischer 2020-01-07 21:34:26 UTC
(In reply to Séverine Queune from comment #10)
> We added this code on 'IntranetUserJS' syspref and it works perfectly for us
> :)
> (Found on Biblibre's documentation)
> 
> 
> $(document).ready(function() {
>  
> if ( typeof script !== 'undefined' && !
> $.cookie("issues-table-load-immediately-" + script) ) {
>     $.cookie("issues-table-load-immediately-" + script, true, { expires: 365
> });
> }
>  
> });

Using Severine's workaround - marking WONTFIX.
Comment 12 Kelly McElligott 2020-02-04 13:23:08 UTC
I want to open this back up, please. I believe that this is worth talking about again.  A system preference would be optimal to allow libraries to turn on/off.
Comment 13 Marie-Luce Laflamme 2022-10-03 15:42:45 UTC
The IntranetUserJS syspref work around isn't working in Koha 22.05+ version.
Comment 14 Katrin Fischer 2022-10-24 21:31:41 UTC
(In reply to Marie-Luce Laflamme from comment #13)
> The IntranetUserJS syspref work around isn't working in Koha 22.05+ version.

The handling for cookies has changed, this appears to work on master:

$(document).ready(function() {
 
if (typeof script !== 'undefined' && Cookies.get("issues-table-load-immediately-" + script) !== "true") {
    Cookies.set("issues-table-load-immediately-" + script, true, { expires: 365, sameSite: 'Lax'  });
}
 
});
Comment 15 Marie-Luce Laflamme 2022-10-25 20:33:46 UTC
(In reply to Katrin Fischer from comment #14)
> (In reply to Marie-Luce Laflamme from comment #13)
> > The IntranetUserJS syspref work around isn't working in Koha 22.05+ version.
> 
> The handling for cookies has changed, this appears to work on master:
> 
> $(document).ready(function() {
>  
> if (typeof script !== 'undefined' &&
> Cookies.get("issues-table-load-immediately-" + script) !== "true") {
>     Cookies.set("issues-table-load-immediately-" + script, true, { expires:
> 365, sameSite: 'Lax'  });
> }
>  
> });


Your quick fix works well in 22.05 and the latest master version.

Thanks Kathrin
Comment 16 Katrin Fischer 2022-10-25 20:52:16 UTC
(In reply to Marie-Luce Laflamme from comment #15)
> (In reply to Katrin Fischer from comment #14)
> > (In reply to Marie-Luce Laflamme from comment #13)
> > > The IntranetUserJS syspref work around isn't working in Koha 22.05+ version.
> > 
> > The handling for cookies has changed, this appears to work on master:
> > 
> > $(document).ready(function() {
> >  
> > if (typeof script !== 'undefined' &&
> > Cookies.get("issues-table-load-immediately-" + script) !== "true") {
> >     Cookies.set("issues-table-load-immediately-" + script, true, { expires:
> > 365, sameSite: 'Lax'  });
> > }
> >  
> > });
> 
> 
> Your quick fix works well in 22.05 and the latest master version.
> 
> Thanks Kathrin

Thx for the feedback, happy it helped!
Comment 17 Donna 2023-02-17 18:57:14 UTC
While it's great to have the js, it would be awesome if this could be a system preference.
Comment 18 Kristi 2023-07-14 19:01:52 UTC
Agreed on this. It would be nice if showing checkouts automatically would be a system preference.
Comment 19 Agnes Rivers-Moore 2023-10-10 17:28:58 UTC
+1 for making it a syspref the library can control, and that persists! We just had an upgrade and lost this work around again. For our library this is essential customer service - when staff check out we look for anything that's due soon and needs renewing. Also helps in self-checkout, that red overdue items show immediately. Thanks!
Comment 20 Marie-Luce Laflamme 2023-10-18 20:33:30 UTC
I agree, it would be a huge plus to have a system preference instead of using JS code.
Comment 21 Laura O'Neil 2023-11-13 19:05:44 UTC
This is a big request from our partner libraries; turning this into a system preference would be lovely. The JS is good to have on hand, but sometimes stops working after major releases.
Comment 22 Lucas Gass 2024-01-26 17:44:25 UTC
Created attachment 161548 [details] [review]
Bug 14180: Perltidy

To test:
1. APPLY PATCH, updatedatebase, restart_all
2. Search for the system preference 'AlwaysLoadCheckoutsTable' and set it to 'Do'.
3. Go to 'circ/circulation.pl?borrowernumber=X' for a patron with checkouts. ( Check out tab ).
4. The table should load right away.
5. Go to 'members/moremember.pl?borrowernumber=X' for a patron with checkouts. ( Details tab ).
6. The table should load right way.
7. Set a value in the 'LoadCheckoutsTableDelay' system preference.
8. Back on 'circ/circulation.pl?borrowernumber=X', make sure the delay is honored. You should see a message like "Checkouts table will automatically load in X seconds".
9. The delay should NOT be honored on'members/moremember.pl?borrowernumber=X', that table should load right away/
10. Turn off 'AlwaysLoadCheckoutsTable' and make sure the table does not load, or loads according to the cookie set when checking the 'Always show checkouts automatically' checkbox.
Comment 23 Lucas Gass 2024-01-26 17:45:01 UTC
Created attachment 161549 [details] [review]
Bug 14180: Add AlwaysLoadCheckoutsTable system preference
Comment 24 Lucas Gass 2024-01-26 17:45:04 UTC
Created attachment 161550 [details] [review]
Bug 14180: Add option to always load the issues table
Comment 25 Lucas Gass 2024-01-26 17:45:07 UTC
Created attachment 161551 [details] [review]
Bug 14180: Perltidy

To test:
1. APPLY PATCH, updatedatebase, restart_all
2. Search for the system preference 'AlwaysLoadCheckoutsTable' and set it to 'Do'.
3. Go to 'circ/circulation.pl?borrowernumber=X' for a patron with checkouts. ( Check out tab ).
4. The table should load right away.
5. Go to 'members/moremember.pl?borrowernumber=X' for a patron with checkouts. ( Details tab ).
6. The table should load right way.
7. Set a value in the 'LoadCheckoutsTableDelay' system preference.
8. Back on 'circ/circulation.pl?borrowernumber=X', make sure the delay is honored. You should see a message like "Checkouts table will automatically load in X seconds".
9. The delay should NOT be honored on'members/moremember.pl?borrowernumber=X', that table should load right away/
10. Turn off 'AlwaysLoadCheckoutsTable' and make sure the table does not load, or loads according to the cookie set when checking the 'Always show checkouts automatically' checkbox.
Comment 26 ByWater Sandboxes 2024-01-26 18:23:24 UTC
Created attachment 161554 [details] [review]
Bug 14180: Add AlwaysLoadCheckoutsTable system preference

Signed-off-by: Kelly <kelly@bywatersolutions.com>
Comment 27 ByWater Sandboxes 2024-01-26 18:23:27 UTC
Created attachment 161555 [details] [review]
Bug 14180: Add option to always load the issues table

Signed-off-by: Kelly <kelly@bywatersolutions.com>
Comment 28 ByWater Sandboxes 2024-01-26 18:23:30 UTC
Created attachment 161556 [details] [review]
Bug 14180: Perltidy

To test:
1. APPLY PATCH, updatedatebase, restart_all
2. Search for the system preference 'AlwaysLoadCheckoutsTable' and set it to 'Do'.
3. Go to 'circ/circulation.pl?borrowernumber=X' for a patron with checkouts. ( Check out tab ).
4. The table should load right away.
5. Go to 'members/moremember.pl?borrowernumber=X' for a patron with checkouts. ( Details tab ).
6. The table should load right way.
7. Set a value in the 'LoadCheckoutsTableDelay' system preference.
8. Back on 'circ/circulation.pl?borrowernumber=X', make sure the delay is honored. You should see a message like "Checkouts table will automatically load in X seconds".
9. The delay should NOT be honored on'members/moremember.pl?borrowernumber=X', that table should load right away/
10. Turn off 'AlwaysLoadCheckoutsTable' and make sure the table does not load, or loads according to the cookie set when checking the 'Always show checkouts automatically' checkbox.

Signed-off-by: Kelly <kelly@bywatersolutions.com>
Comment 29 Andrew Fuerste-Henry 2024-02-02 20:38:12 UTC
This looks like maybe it should have been set to Signed Off when Kelly tested it 1/26. As of today, the patch doesn't apply.
Comment 30 Lucas Gass 2024-02-05 21:37:17 UTC
(In reply to Andrew Fuerste-Henry from comment #29)
> This looks like maybe it should have been set to Signed Off when Kelly
> tested it 1/26. As of today, the patch doesn't apply.

Due to patches from Bug 35506 being pushed to master.