Summary: | Permanent location should show with cart location - returns.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Christopher Brannon <cbrannon> |
Component: | Circulation | Assignee: | Christopher Brannon <cbrannon> |
Status: | Failed QA --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | aleisha, genevieve.beaudry, gmcharlt, jasmineamohia.student, kyle.m.hall, martin.renvoize, olivialokm |
Version: | Main | Keywords: | 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: | ||
Circulation function: | |||
Attachments: |
Bug 21444: Adds the permanent location
Bug 21444: Clean up whitespace |
Description
Christopher Brannon
2018-09-27 18:38:47 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. Created attachment 79548 [details] [review] Bug 21444: Clean up whitespace 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. Bug has been tested and the fix is working. 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; |