Bugzilla – Attachment 124815 Details for
Bug 28653
Sorting loans by due date doesn't work after renewing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28653: Add new method RefreshIssuesTable
Bug-28653-Add-new-method-RefreshIssuesTable.patch (text/plain), 2.89 KB, created by
Joonas Kylmälä
on 2021-09-12 14:13:29 UTC
(
hide
)
Description:
Bug 28653: Add new method RefreshIssuesTable
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2021-09-12 14:13:29 UTC
Size:
2.89 KB
patch
obsolete
>From de24a5ea0bd3a23eb1bf3810b0fcf39151b9c598 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Fri, 2 Jul 2021 15:05:27 +0300 >Subject: [PATCH] Bug 28653: Add new method RefreshIssuesTable >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >On patrons check out or details page, after renewing >loans they don't sort correctly when clicking on "Date due" >tab. Page has to be reloaded so that sorting works. >This patch adds new method RefreshIssuesTable to >checkouts.js. When loans are renewed or checked in, issues >table is reloaded to and due dates are sorted correctly. > >To test: >1. Add 3 loans for patron. >2. Change due dates so you they are e.g. 07/01, 07/02, 07/04 >3. Make sure you have renewal period set e.g. 5 days and >check your RenewalPeriodBase syspref (I use current date there) >4. Renew loan with date due on 07/01, it should now be 07/07 >5. Sort loans by date due >=> Note that order from top to bottom is 07/04->07/02->07/07 >or 07/07->07/02->07/04, not 07/02->07/04->07/07 as one would >assume. >6. Apply patch and repeat. >=> Note that issues table is reloaded ("Loading..." pop-up is displayed) >and that due dates are in correct order. > >Sponsored-by: Koha-Suomi Oy > >Signed-off-by: kelly <kelly@bywatersolutions.com> > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 0c391c2bc0..250ae1ca1e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -249,6 +249,10 @@ $(document).ready(function() { > return false; > }); > >+ $('#RenewCheckinChecked').on('click', function(){ >+ RefreshIssuesTable(); >+ }); >+ > if ( Cookies.get("issues-table-load-immediately-" + script) == "true" ) { > LoadIssuesTable(); > $('#issues-table-load-immediately').prop('checked', true); >@@ -257,6 +261,11 @@ $(document).ready(function() { > Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365 }); > }); > >+ function RefreshIssuesTable() { >+ var table = $('#issues-table').DataTable(); >+ table.ajax.reload(); >+ } >+ > function LoadIssuesTable() { > $('#issues-table-loading-message').hide(); > $('#issues-table').show(); >@@ -293,7 +302,7 @@ $(document).ready(function() { > "iDataSort": 2, // Sort on hidden unformatted date due column > "mDataProp": function( oObj ) { > var due = oObj.date_due_formatted; >- >+ console.log(due); > if ( oObj.date_due_overdue ) { > due = "<span class='overdue'>" + due + "</span>"; > } >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28653
:
122543
|
123706
| 124815 |
124816