[Koha-bugs] [Bug 5911] Transport Cost Matrix of transporting an item between branches

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 18 20:25:07 CEST 2012


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

Melia Meggs <melia at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |melia at bywatersolutions.com

--- Comment #15 from Melia Meggs <melia at bywatersolutions.com> ---
I am not sure I understand well enough the complexities of home branch, holding
branch, patron's branch, pickup branch, etc., but here is my attempt at a test
plan.  Community members (Ian in particular), please let me know if this sounds
like the right idea.


First test:
1. Go to Administration > Sys Prefs.  Turn on the Transport Cost Matrix.  Turn
off AutomaticItemReturn. (Turning off AutomaticItemReturn means that we're
going to be looking at holding branch, not home branch.)
2. Go to the "new administrative page that serves to manage the relative costs
of transporting an item between branches."  (I don't know where to find this
page or what it looks like.)
3. Enter a numeric value for each branch (from 0 to 100).  This numeric value
indicates the "cost" of transporting an item from that branch to every other
branch.  Example:
from Branch B to A - 1
from Branch C to A - 2
from Branch D to A - 2
4. Place four holds on next available item with pickup Branch A.  Choose a
title that has two items with current holding branch as Branch A.
5. Since the item is already there, the first hold should be filled by Branch
A.  
6. Since Branch A has another copy of the item, the second hold should also be
filled by Branch A.
7. Since Branch A has no more copies of the item, the third hold should be
filled by Branch B because it has the least cost of transport.
8. If Branch B has another copy of the item, the fourth should also be filled
by Branch B.  If Branch B has no more copies of the item, the fourth hold
should be filled by either Branch C or D (random choice because they have equal
cost of transport).

-------------------

Second test:
1. Place four holds on next available item with pickup Branch A.  Choose a
title that has NO items with current holding branch of Branch A but one item
with current holding branch of Branch B.
2. Since Branch A has no copies of this item, the first hold should be filled
by Branch B because it has the least cost of transport.
3. If Branch B has no more copies of the item, the second, third and fourth
holds should be filled by Branches C and D (in random order because they have
equal cost of transport - how do we test if random?)

-------------------

Third test:
1. Turn on AutomaticItemReturn sys pref.  This means items will automatically
be transferred back to their home branch when returned, so holding branch
doesn't matter any more.
2. Place four holds on next available item with pickup Branch A.  Choose a
title that has 1 item with Branch A as home branch.
3. The first hold should be filled by Branch A.
4. Since Branch A has no more copies of the item, the second hold should be
filled by Branch B.
5. If Branch B has another copy of the item, the third hold should be filled by
Branch B.  If Branch B has no more copies of the item, the fourth hold should
be filled by either Branch C or D (random choice).

-------------------

Fourth test:
1. Go back to the "new administrative page that serves to manage the relative
costs of transporting an item between branches."  Use the toggle to block all
transport from Branch B to any other branch.  (This means no items will ever be
transferred from Branch B.)
2. Place four holds on next available item with pickup Branch A.  Choose a
title that has one item with Branch A as home branch and one item with Branch B
as home branch.
3. The first hold should be filled by Branch A.
4. The second, third and fourth holds should be filled by Branches C and D
(random choice).  We are skipping over the item at Branch B because it cannot
be transferred to Branch A for pickup (i.e. that item at Branch B can only ever
fill holds with pickup branch as Branch B).

--------------------

This is way, way complicated, but what we've got here is a situation in which
the behavior of the system depends upon rules that are indicated by the numeric
values in a matrix.  Can't a computer test this better than I can?  I believe
we need automated testing (unit tests, at least).  I would be happy to provide
a sample matrix if you could include the data in the unit test which covers the
code.

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


More information about the Koha-bugs mailing list