Bug 33948

Summary: Replace GetAllIssues with Koha::Checkouts - staff
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: enhancement    
Priority: P5 - low CC: bugzilla, clackman, fridolin.somers, kyle, laurence.rault, lmstrand, madamyk, nugged, robin, sophie.meynieux, stalkernoid
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:
Bug Depends on: 33946    
Bug Blocks: 33947, 35335, 35366    
Attachments: Bug 33948: Replace GetAllIssues with Koha::Checkouts - staff
Bug 33948: Replace GetAllIssues with Koha::Checkouts - staff
Bug 33948: Replace GetAllIssues with Koha::Checkouts - staff

Description Jonathan Druart 2023-06-08 07:46:46 UTC

    
Comment 1 Jonathan Druart 2023-06-08 08:22:09 UTC
*** Bug 8483 has been marked as a duplicate of this bug. ***
Comment 2 Jonathan Druart 2023-06-08 11:02:15 UTC
Created attachment 152154 [details] [review]
Bug 33948: Replace GetAllIssues with Koha::Checkouts - staff

This patch replace GetAllIssues in readingrec.pl which is the only
occurrence in the staff code.

To test this patch you will need several items in your checkout history
in order to confirm that the display is the same before and after the
patch.

However there is one change! And it's a bug fix (or an enhancement, it
depends on how you see things). It includes checkouts with deleted items, which is
a long standing bug (see bug 8483).

Performance will be compared as well.
Comment 3 Fridolin Somers 2023-07-27 21:24:06 UTC
Created attachment 154005 [details] [review]
Bug 33948: Replace GetAllIssues with Koha::Checkouts - staff

This patch replace GetAllIssues in readingrec.pl which is the only
occurrence in the staff code.

To test this patch you will need several items in your checkout history
in order to confirm that the display is the same before and after the
patch.

However there is one change! And it's a bug fix (or an enhancement, it
depends on how you see things). It includes checkouts with deleted items, which is
a long standing bug (see bug 8483).

Performance will be compared as well.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 4 Fridolin Somers 2023-07-27 21:28:26 UTC
I fixed on missing space before $KohaDates : 
[% checkout.returndate |$KohaDates with_hours => 1 %]

Performance looks OK.
Comment 5 Kyle M Hall (khall) 2023-09-22 13:02:17 UTC
Created attachment 156091 [details] [review]
Bug 33948: Replace GetAllIssues with Koha::Checkouts - staff

This patch replace GetAllIssues in readingrec.pl which is the only
occurrence in the staff code.

To test this patch you will need several items in your checkout history
in order to confirm that the display is the same before and after the
patch.

However there is one change! And it's a bug fix (or an enhancement, it
depends on how you see things). It includes checkouts with deleted items, which is
a long standing bug (see bug 8483).

Performance will be compared as well.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Tomás Cohen Arazi (tcohen) 2023-09-22 15:39:14 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 7 Fridolin Somers 2023-09-22 20:30:54 UTC
Enhancement not pushed to 23.05.x
Comment 8 Andrii Nugged 2023-11-14 18:17:30 UTC
koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt

                                <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issue.issuer_id | uri %]">[% issue.firstname | html %] [% issue.surname | html %]</a></td>

changed to:

                                [% SET issuer = checkout.issuer %]
                                <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issuer.issuer_id | uri %]">[% issuer.firstname | html %] [% issuer.surname | html %]</a></td>

that leads to error:

    Koha::Patron->issuer_id is not covered by tests!

should be:


    issuer.borrowernumber

I suppose.
Comment 9 Peter Vashchuk 2023-11-14 18:34:36 UTC
Created a ticket where the fix for this problem will be provided ->
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35335
Comment 10 Jonathan Druart 2023-11-15 13:28:08 UTC
(In reply to Andrii Nugged from comment #8)
> koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
> 
>                                 <td><a
> href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issue.issuer_id |
> uri %]">[% issue.firstname | html %] [% issue.surname | html %]</a></td>
> 
> changed to:
> 
>                                 [% SET issuer = checkout.issuer %]
>                                 <td><a
> href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issuer.issuer_id |
> uri %]">[% issuer.firstname | html %] [% issuer.surname | html %]</a></td>
> 
> that leads to error:
> 
>     Koha::Patron->issuer_id is not covered by tests!
> 
> should be:
> 
> 
>     issuer.borrowernumber
> 
> I suppose.

Yes, can you provide a fix?