Bug 30064

Summary: Dates in issues table on subscriptions tab in OPAC are not sorting correctly
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: janet.mcgowan, lucas
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Katrin Fischer 2022-02-09 15:34:37 UTC
The publication date and received date columns in the issues table in the OPAC are not sorting correctly.

To recreate:
- Create a subscription
- Receive mulitple issues, manipulate the published and received dates to be in different months and years
- Open the record in the OPAC and switch to the subscription tab
- The sorting on top of the table indicates that it should be sorted by publication date
- Verify it is not sorted correctly, also not after clicking on the column header
Comment 1 Katrin Fischer 2023-07-01 13:49:43 UTC
*** Bug 28997 has been marked as a duplicate of this bug. ***
Comment 2 Katrin Fischer 2023-07-01 13:49:49 UTC
(In reply to Janet McGowan from comment #0)
> Similar to the issues reported in Bug 27934, the subscription table is not
> sorting correctly.
> In opac-detail.tt
> 
> <td class="publisheddate"><span title="[% latestserial.publisheddate | html
> %]">[% latestserial.publisheddate | $KohaDates %]</span></td>
>  <td class="planneddate"><span title="[% latestserial.planneddate | html
> %]">[% latestserial.planneddate | $KohaDates %]</span></td>
> 
> If these lines are changed to use data-order instead as per:
> <td data-order="[% reserveloo.waitingdate | html %]">[%
> reserveloo.waitingdate | $KohaDates %]</td>
> <td data-order="[% reserveloo.reservedate | html %]">[%
> reserveloo.reservedate | $KohaDates %]</td>
> 
> they sort correctly.