Bug 8531 - Staff hold requests generate silent errors
Summary: Staff hold requests generate silent errors
Status: RESOLVED DUPLICATE of bug 8474
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: 3.6
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-31 08:19 UTC by Piotr Kowalski
Modified: 2014-07-12 12:07 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed patch to placerequest.pl (1.29 KB, text/plain)
2012-07-31 08:19 UTC, Piotr Kowalski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kowalski 2012-07-31 08:19:01 UTC
Created attachment 11215 [details]
Proposed patch to placerequest.pl

This bug extends the bug #8474
Silent errors occur when a librarian makes holds using staff interface.
The reason is uninitialized or wrong value and generally logical mistakes in line block: 115 - 123 in module placerequest.pl
In line 115: if ($input->param('request') eq 'any'){
parameter is compared to string 'any' whereas should be 'Any'. The other wrong thing is lack of value when the parameter hasn't value 'Any'.
Due to this reasons always is realized only one line of code updating the reservation table (what is right):
AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem, $found);
regardles the reservation is done on a first available or a given item.

My proposition is to modify and simplify this block of lines like that (see also attached differential listing):
if ($multi_hold) {
            my $bibinfo = $bibinfos{$biblionumber};
            AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,'a',[$biblionumber],
                       $bibinfo->{rank},$startdate,$expirationdate,$notes,$bibinfo->{title},$checkitem,$found);
        } else {
             AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem, $found);
        }
    }

Proposed patch refers to Koha 3.6.4 version as well as 3.6.6 and 3.8
Comment 1 Katrin Fischer 2014-07-12 12:07:27 UTC

*** This bug has been marked as a duplicate of bug 8474 ***