Bug 14404: Checkouts default sort order for Self Checkout (SCO) confusing for patrons
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 16 Jun 2015 23:05:10 +0000 (19:05 -0400)
committerMason James <mtj@kohaaloha.com>
Fri, 28 Aug 2015 02:55:23 +0000 (14:55 +1200)
Libraries are reporting that patrons are very confused during
self-checkout. The problem is they are expecting the list of checkouts
to be in the order they checked out the items ( first checkout on the
bottom, last item checked out on top ). However, the checkouts
table is sorted by title ( ascending ) then due date ( descending ).
This is not intuitive.

Test Plan:
1) Enable Koha's self checkout
2) Use the SCO to check out a random assortment of items,
   make sure you don't check them out in alphabetical order
3) Note the order of the items in the list is not based on the order
   you checked them out in
4) Apply this patch
5) Refresh the page
6) Note the items are now in the order you checked them out
   with the last on top and the first on bottom

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit e9061028c1ba95b310be5e9333b224e735e64f40)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>

koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt

index e4006d3..70e3cd4 100644 (file)
                                     <caption>Checkouts for [% borrowername %] <span class="count">([%   issues_count %] total)</span></caption>
                                     <!-- ISSUES TABLE ROWS -->
                                     <thead>
-                                        <tr><th class="anti-the">Title</th><th>Call no.</th><th class="title-string">Due</th><th class="nosort">Renew</th>[% UNLESS ( nofines ) %]<th>Fines</th>[% END %]</tr>
+                                        <tr>
+                                            <th class="no-show">Checked out on</th>
+                                            <th class="anti-the">Title</th>
+                                            <th>Call no.</th>
+                                            <th class="title-string">Due</th>
+                                            <th class="nosort">Renew</th>
+                                            [% UNLESS ( nofines ) %]
+                                                <th>Fines</th>
+                                            [% END %]
+                                        </tr>
                                     </thead>
                                     <tbody>
                                         [% FOREACH ISSUE IN ISSUES %]
                                             <tr>
+                                                <td>[% ISSUE.issuedate %]</td>
                                                 <td>
                                                     [% UNLESS ( noitemlinks ) %]
                                                         <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE.  biblionumber %]">[% ISSUE.title |html %]</a>
             dofocus();
             [% IF ( patronid ) %]sco_init();[% END %]
             $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
-                "aaSorting": [ [2, "desc"], [0, "asc"] ],
+                "aaSorting": [ 0 ],
                 "aoColumnDefs": [
-                    { "aTargets": [ "nosort" ],"bSortable": false,"bSearchable": false },
+                    { "aTargets": [ "nosort" ], "bSortable": false, "bSearchable": false },
+                    { "aTargets": [ "no-show" ], "bVisible": false, "bSearchable": false },
                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
                 ]