Bug 21444

Summary: Permanent location should show with cart location - returns.pl
Product: Koha Reporter: Christopher Brannon <cbrannon>
Component: CirculationAssignee: Christopher Brannon <cbrannon>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, genevieve.beaudry, gmcharlt, jasmineamohia.student, katrin.fischer, kyle.m.hall, martin.renvoize, olivialokm
Version: MainKeywords: Academy
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18355
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 21444: Adds the permanent location
Bug 21444: Clean up whitespace

Description Christopher Brannon 2018-09-27 18:38:47 UTC
Continuing work started from 18355.  Making correction to returns.pl.
Comment 1 Christopher Brannon 2018-09-27 20:03:01 UTC
Created attachment 79547 [details] [review]
Bug 21444: Adds the permanent location

To Test:
1) Be sure ReturnToShelvingCart is set to Move.
2) Check out an item.
3) Check in the item.
4) Note that only the CART location shows in the Shelving location
column.
5) Apply the patch.
6) Check out an item.
7) Check in the item.
8) Note that the permant location now shows with the cart location next
to in in parenthesis.
9) Try combinations of missing descriptions or missing locations from
the LOC table for the item permanent location and cart.  If there is no
description, it should show the code in its place.  If there is no
location defined, it will show either the code that is stored in the
item or be blank.
Comment 2 Christopher Brannon 2018-09-27 20:06:57 UTC
Created attachment 79548 [details] [review]
Bug 21444: Clean up whitespace
Comment 3 Christopher Brannon 2018-09-27 20:09:22 UTC
I am open to suggestions on this one.  I show both the permanent location for the shelving, and the cart location.  I feel it might be redundant to show the cart location as well, since the item is in hand and being checked in.  If there are enough objections, I will gladly remove the cart location.
Comment 4 Genevieve Beaudry 2019-02-08 20:12:21 UTC
Bug has been tested and the fix is working.
Comment 5 Katrin Fischer 2019-02-09 19:54:16 UTC
Hi Christopher,

I'have tested it and it works nicely. I wonder if it should be Book cart (permanent location) as the first is the current... but I think both work.

But I'd like to ask you to move the display logic, like setting the () to the template.

I have to say that I am confused by all the checking before your patch and after - but I notice it's different than before?


-        $ri{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
+        my $permshelfcode = $ri{'permlocation'};
+        $ri{'location'} = ( $shelflocations->{$permshelfcode} ne '' ) ? $shelflocations->{$permshelfcode} : ( $permshelfcode ) ? $permshelfcode : undef;
+        $ri{'location'} .= ( ( $shelflocations->{$shelfcode} ne '' ) && ( $shelfcode ne $permshelfcode ) ) ? ' (' . $shelflocations->{$shelfcode} . ')' : ( ( $shelfcode ) && ( $shelfcode ne $permshelfcode ) ) ? ' (' . $shelfcode . ')' : undef;