Bug 8455 - Check ins processed through "Check Out" tab of the Patron Record ignore Circulation System Preferences
Summary: Check ins processed through "Check Out" tab of the Patron Record ignore Circu...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low normal (vote)
Assignee: David Cook
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-17 08:17 UTC by David Cook
Modified: 2013-12-05 19:59 UTC (History)
5 users (show)

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


Attachments
Bug 8455 - Check ins processed through "Check Out" tab of the Patron Record ignore Circulation System Preferences (2.74 KB, patch)
2012-07-17 08:32 UTC, David Cook
Details | Diff | Splinter Review
Bug 8455 - Check ins processed through "Check Out" tab of the Patron Record ignore Circulation System Preferences (2.79 KB, patch)
2012-07-18 14:16 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 8455 - Followup - perltidy renewscript.pl (4.94 KB, patch)
2012-07-18 14:17 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8455 - Followup - perltidy renewscript.pl (5.05 KB, patch)
2012-07-19 00:41 UTC, David Cook
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2012-07-17 08:17:57 UTC
If you check-in an item through the "Check Out" tab of the Patron Record, the return/check-in ignores the "InProcessingToShelvingCart" and "ReturnToShelvingCart" circulation system preferences. Or rather, there just isn't any logic to handle them in the renewscript.pl file. 

I'm pretty much just bringing the code straight across from returns.pl, although some minor changes need to be made due to context.

Both system preferences are important to include, since you can check-out an in processing item to a patron. While a regular check-in will clear the in processing status, a check-in through the Patron module will cause the item to have its status returned to "In Processing" rather than going to "Shelving Cart", if the preference is set, of course.

To test the scenario, turn on one of (or both of) these settings and try checking books in through the Circulation module and the Patron module. 

Before the patch, you will see that only the Circulation module will change the shelving location. 

After the patch, you should see identical behaviour. 

Yay consistency!
Comment 1 David Cook 2012-07-17 08:32:02 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2012-07-18 14:16:58 UTC
Created attachment 10977 [details] [review]
Bug 8455 - Check ins processed through "Check Out" tab of the Patron Record ignore Circulation System Preferences

If you check-in an item through the "Check Out" tab of the Patron Record, the return/check-in ignores the "InProcessingToShelvingCart" and "ReturnToShelvingCart" circulation system preferences. Or rather, there just isn't any logic to handle them in the renewscript.pl file.

I'm pretty much just bringing the code straight across from returns.pl, although some minor changes need to be made due to context.

Both system preferences are important to include, since you can check-out an in processing item to a patron. While a regular check-in will clear the in processing status, a check-in through the Patron module will cause the item to have its status returned to "In Processing" rather than going to "Shelving Cart", if the preference is set, of course.

To test the scenario, turn on one of (or both of) these settings and try checking books in through the Circulation module and the Patron module.

Before the patch, you will see that only the Circulation module will change the shelving location.

After the patch, you should see identical behaviour.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

http://bugs.koha-community.org/show_bug.cgi?id=7189
Comment 3 Kyle M Hall 2012-07-18 14:17:14 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2012-07-18 14:20:15 UTC
Signed off on primary patch. I've added a followup to perltidy renewscript.pl, as this seems like a good time to do it. I doubt there are any other patches in process that touch this file. David, if you can sign off on the followup, you could then mark the status of this bug as "Signed Off".
Comment 5 David Cook 2012-07-19 00:41:02 UTC
Created attachment 10989 [details] [review]
[SIGNED-OFF] Bug 8455 - Followup - perltidy renewscript.pl

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 6 David Cook 2012-07-19 00:49:43 UTC
Signed off on follow-up patch. Perltidy looks good and everything seems to work.
Comment 7 Paul Poulain 2012-08-02 14:48:26 UTC
QA comment:
 * fixes a real problem. The best fix would have been to refactor circulation to avoid code duplication. If we had a single entry point for circulation, the behaviour would have been correct. But I won't reject your patch because you haven't changed 100000 lines :-)

No other comment, passed QA
Comment 8 Paul Poulain 2012-08-02 14:52:46 UTC
Another comment: on the members pages members/moremember.pl?borrowernumber=NNN, you can also check-in.
This page calls reserve/renewscript.pl as well, so it fixes the behaviour here as well.
( Note that I haven't tested it works, but at least it does not break anything if you don't have InProcessingToShelvingCart or ReturnToShelvingCart set)
Comment 9 Chris Cormack 2012-08-02 23:11:26 UTC
Bug fix patch is in 3.8.x, will be in 3.8.4