[Koha-bugs] [Bug 10476] New: Guarantor Search Not Limiting by Category Type

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 17 05:59:40 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10476

            Bug ID: 10476
           Summary: Guarantor Search Not Limiting by Category Type
    Classification: Unclassified
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Patrons
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: dcook at prosentient.com.au
                CC: gmcharlt at gmail.com, kyle.m.hall at gmail.com

Currently, the guarantor search is not being limited by category type.

In guarantor_search.pl, there is code that says the search of the borrowers
table should be limited by the category_type "A" (i.e. Adult) (or "I" (i.e.
Institution) in the event that the patron being guaranteed has a category_type
of "P" (i.e. Professional). 

Here is the code:

my $search_category = 'A';
if ($category_type eq 'P'){
    $search_category = 'I';
}

$results = Search({''=>$member, category_type=>$search_category},$orderby);

However! If you investigate the "Search" sub and the subsequent "SearchInTable"
sub, there is no reference to the "categories" table where the "category_type"
column is located. Moreover, if you actually do a search for guarantors, you
will always be able to retrieve any patron. 

That means that professionals can guarantee professionals, and children and
guarantee children.

It looks like this bug was introduced when Search and SearchMember were unified
into the one Search sub. 

--

Now...for our purposes at Prosentient...we actually want professionals to be
able to guarantee professionals, so this bug is actually "beneficial".

However, I imagine lots of people in public libraries might not like having a
guarantor search that doesn't weed out the children. 

I probably won't work on this bug (at least not any time soon), but it might an
idea to create a system preference that allows users to decide what type of
guarantor->guarantee relationship they want to set up in terms of category
types.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list