Bug 39081: Fix date and title sorting on batch extend due dates page

This patch updates sorting of the batch extend due dates page so that
dates and titles are sorted correctly.

To test, apply the patch and go to Tools -> Batch extend due dates.

- Submit parameters which will return multiple results
- On the "Confirm selection" page, test the sorting of these columns:
  - Due date
  - Title
  - Checked out on
  - New due date

Sponsored-by: Athens County Public Libraries
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Owen Leonard 2025-02-12 16:52:06 +00:00 committed by Katrin Fischer
parent c1af78c1df
commit 1d3cc2c5c7
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 4 additions and 4 deletions

View File

@ -169,7 +169,7 @@
<tr>
<th class="no-sort">&nbsp;</th>
<th>Due date</th>
<th>Title</th>
<th class="anti-the">Title</th>
<th class="no-sort">Item type</th>
<th>Home library</th>
<th>Checked out on</th>
@ -181,13 +181,13 @@
[% FOR checkout IN checkouts %]
<tr>
<td><input type="checkbox" name="issue_id" value="[% checkout.issue_id | html %]" /></td>
<td>[% checkout.date_due | $KohaDates as_due_date => 1 %]</td>
<td data-sort="[% checkout.date_due | html %]">[% checkout.date_due | $KohaDates as_due_date => 1 %]</td>
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% checkout.item.biblio.biblionumber | uri %]">[% checkout.item.biblio.title | html %]</a></td>
<td>[% ItemTypes.GetDescription( checkout.item.effective_itemtype ) | html %]</td>
<td>[% checkout.item.home_branch.branchname | html %]</td>
<td>[% checkout.issuedate | $KohaDates %]</td>
<td data-sort="[% checkout.issuedate | html %]">[% checkout.issuedate | $KohaDates %]</td>
<td>[% Branches.GetName( checkout.branchcode ) | html %]</td>
<td> [% new_due_dates.shift | $KohaDates as_due_date => 1 %] </td>
<td data-sort="[% new_due_dates.shift | html %]"> [% new_due_dates.shift | $KohaDates as_due_date => 1 %] </td>
</tr>
[% END %]
</tbody>