Bug 26362 - Overdue report shows incorrect branches for patron, holdingbranch, and homebranch
Summary: Overdue report shows incorrect branches for patron, holdingbranch, and homebr...
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: David Cook
QA Contact: Testopia
URL:
Keywords:
Depends on: 21852
Blocks:
  Show dependency treegraph
 
Reported: 2020-09-03 04:51 UTC by David Cook
Modified: 2020-09-20 19:18 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.04, 19.11.10


Attachments
Bug 26362: Show correct libraries in overdues report (3.29 KB, patch)
2020-09-03 05:42 UTC, David Cook
Details | Diff | Splinter Review
Bug 26362: Show correct libraries in overdues report (3.34 KB, patch)
2020-09-03 06:28 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 26362: Show correct libraries in overdues report (3.41 KB, patch)
2020-09-03 09:16 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2020-09-03 04:51:19 UTC
The library columns in the report at /cgi-bin/koha/circ/overdue.pl are completely wrong.

This isn't obvious in a single branch environment, but in multibranch environments with items that move around it becomes more obvious. 

Currently, 
Patron library = home branch
Home library = holding branch
Holding library = patron branch
Comment 1 David Cook 2020-09-03 05:42:30 UTC
Created attachment 109569 [details] [review]
Bug 26362: Show correct libraries in overdues report

Currently the overdues report does the following display:
Patron library = home branch
Home library = holding branch
Holding library = patron branch

This patch corrects the display of libraries in the overdues report.

To test:

0) Do not apply patch
1) Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
2) Go to http://localhost:8081/cgi-bin/koha/circ/set-library.pl
3) Choose "Troy"
4) http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
5) Checkout "39999000004571" with due date of "09/01/2019 23:59"

Note the facts:
Patron library = Centerville
Home library = Fairview
Holding library = Troy

6) Go to http://localhost:8081/cgi-bin/koha/circ/overdue.pl
7) Change "Columns" visibility to show Holding and Home libraries
8) Note that the libraries are incorrect:

Patron library appears to be: Fairview
Home library appears to be: Troy
Holding library appears to be: Centerville

9) Apply the patch
10) koha-plack --restart kohadev
11) Go to http://localhost:8081/cgi-bin/koha/circ/overdue.pl
12) Change "Columns" visibility to show Holding and Home libraries
13) Note that the libraries are correct:

Patron library appears to be: Centerville
Home library appears to be: Fairview
Holding library appears to be: Troy
Comment 2 Emmi Takkinen 2020-09-03 06:28:35 UTC
Created attachment 109570 [details] [review]
Bug 26362: Show correct libraries in overdues report

Currently the overdues report does the following display:
Patron library = home branch
Home library = holding branch
Holding library = patron branch

This patch corrects the display of libraries in the overdues report.

To test:

0) Do not apply patch
1) Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
2) Go to http://localhost:8081/cgi-bin/koha/circ/set-library.pl
3) Choose "Troy"
4) http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
5) Checkout "39999000004571" with due date of "09/01/2019 23:59"

Note the facts:
Patron library = Centerville
Home library = Fairview
Holding library = Troy

6) Go to http://localhost:8081/cgi-bin/koha/circ/overdue.pl
7) Change "Columns" visibility to show Holding and Home libraries
8) Note that the libraries are incorrect:

Patron library appears to be: Fairview
Home library appears to be: Troy
Holding library appears to be: Centerville

9) Apply the patch
10) koha-plack --restart kohadev
11) Go to http://localhost:8081/cgi-bin/koha/circ/overdue.pl
12) Change "Columns" visibility to show Holding and Home libraries
13) Note that the libraries are correct:

Patron library appears to be: Centerville
Home library appears to be: Fairview
Holding library appears to be: Troy

Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com>
Comment 3 Martin Renvoize 2020-09-03 09:16:27 UTC
Created attachment 109598 [details] [review]
Bug 26362: Show correct libraries in overdues report

Currently the overdues report does the following display:
Patron library = home branch
Home library = holding branch
Holding library = patron branch

This patch corrects the display of libraries in the overdues report.

To test:

0) Do not apply patch
1) Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
2) Go to http://localhost:8081/cgi-bin/koha/circ/set-library.pl
3) Choose "Troy"
4) http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
5) Checkout "39999000004571" with due date of "09/01/2019 23:59"

Note the facts:
Patron library = Centerville
Home library = Fairview
Holding library = Troy

6) Go to http://localhost:8081/cgi-bin/koha/circ/overdue.pl
7) Change "Columns" visibility to show Holding and Home libraries
8) Note that the libraries are incorrect:

Patron library appears to be: Fairview
Home library appears to be: Troy
Holding library appears to be: Centerville

9) Apply the patch
10) koha-plack --restart kohadev
11) Go to http://localhost:8081/cgi-bin/koha/circ/overdue.pl
12) Change "Columns" visibility to show Holding and Home libraries
13) Note that the libraries are correct:

Patron library appears to be: Centerville
Home library appears to be: Fairview
Holding library appears to be: Troy

Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2020-09-03 09:17:02 UTC
I'm amazed this hasn't been picked up before!

Trivial patch, works as expected.

Passing QA
Comment 5 Jonathan Druart 2020-09-03 13:05:14 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 6 David Cook 2020-09-04 02:17:58 UTC
(In reply to Martin Renvoize from comment #4)
> I'm amazed this hasn't been picked up before!

I know, right?!

It's been a bug for 2 years. I wonder how frequently people use that report or how carefully they read it or how much inter-branch checkouts happen...

Thanks everyone for the quickness!
Comment 7 Lucas Gass 2020-09-14 21:15:57 UTC
backported to 20.05.x for 20.05.04
Comment 8 Aleisha Amohia 2020-09-15 11:34:33 UTC
backported to 19.11.x for 19.11.10
Comment 9 Victor Grousset/tuxayo 2020-09-20 19:18:43 UTC
Not backported to oldoldstable (19.05.x). Feel free to ask if it's needed.