[Bug 22284] New: hiding libraries outside group for holds dev

classic Classic list List threaded Threaded
41 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] New: hiding libraries outside group for holds dev

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

            Bug ID: 22284
           Summary: hiding libraries outside group for holds dev
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
  Target Milestone: ---

hiding libraries outside group for holds dev

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Hiding libraries outside group for holds

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
            Summary|hiding libraries outside    |Hiding libraries outside
                   |group for holds dev         |group for holds

--- Comment #1 from Katrin Fischer <[hidden email]> ---
I know you probably just wanted the bug number, but to avoid duplicates and
because I am curious... can we get a bit more description? :)

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Hiding libraries outside group for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Tomás Cohen Arazi <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]   |[hidden email]
             Status|NEW                         |ASSIGNED
           Severity|enhancement                 |new feature
                 CC|                            |[hidden email]

--- Comment #2 from Tomás Cohen Arazi <[hidden email]> ---
This development will add pickup location groups.


1. Add a new feature checkbox to groups feature to define 'local hold groups'
2. Hold policy in circ rules - new option 'from local hold group' [effectively
act as homelibrary + libraries in groups you are in]
2a. This will apply per item (C4::Reserves::CanItemBeReserved)
2b. possibly add a system preference to set home or holding as control
2c. Will check patron's homelibrary to see if possible
3. On checkin, hold policy will be checked to see if hold can be filled
according to policy in 2a (dropping through all holds to find highest priority
that can be satisfied)

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Hiding libraries outside group for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Tomás Cohen Arazi <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Change sponsored?|---                         |Sponsored

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Hiding libraries outside group for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Tomás Cohen Arazi <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.koha-community
                   |                            |.org/bugzilla3/show_bug.cgi
                   |                            |?id=20747

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Tomás Cohen Arazi <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Hiding libraries outside    |Groups of pickup locations
                   |group for holds             |for holds

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Lisette Scheer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #3 from Katrin Fischer <[hidden email]> ---
Thx, Tomas!

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Agustín Moyano <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |22688


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22688
[Bug 22688] TT plugin for pickup locations code wrong
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #4 from Tomás Cohen Arazi <[hidden email]> ---
*** Bug 20747 has been marked as a duplicate of this bug. ***

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Agustín Moyano <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Patch complexity|---                         |Medium patch
             Status|ASSIGNED                    |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #5 from Agustín Moyano <[hidden email]> ---
Created attachment 88138
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88138&action=edit
Bug 22284: New ft_local_hold_group column, and 'holgroup' enum option

In order to add groups for holds, this patch provides a new column in
library_groups to identify them. Also provides new enum option for
hold_fulfillment_policy column of default_branch_circ_rules,
default_circ_rules, default_branch_item_rules and branch_item_rules.

To test:
1) check that there is no ft_local_hold_group column in library_groups
and that there are no 'holdgroup' enum option in hold_fulfillment_policy
in default_branch_circ_rules, default_circ_rules, default_branch_item_rules
and branch_item_rules
2) apply this patch
3) run perl installer/data/mysql/updatedatabase.pl
SUCCESS => !(step 1) ;-D
4) Sign off

Sponsored-by: VOKAL

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #6 from Agustín Moyano <[hidden email]> ---
Created attachment 88139
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88139&action=edit
Bug 22284: (follow-up) Add schema modifications

Sponsored-by: VOKAL

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #7 from Agustín Moyano <[hidden email]> ---
Created attachment 88140
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88140&action=edit
Bug 22284: Add new checkbox in Library Groups

This patch adds a new checkbox option 'Is local hold group' when you create a
new root group.

To test:
1) In intranet go to Library Groups in admin module
2) Add new root group
3) Check that there is no 'Is local hold group' checkbox
4) Apply this patch
5) Add new root group
SUCCESS => a new 'Is local hold group' checkbox appears
6) Select 'Is local hold group' and save
7) Click edit button for root group
SUCCESS => 'Is local hold group' is checked
8) Sign off

Sponsored-by: VOKAL

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #8 from Agustín Moyano <[hidden email]> ---
Created attachment 88141
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88141&action=edit
Bug 22284: New methods in Koha::Library::Groups and Koha::Library

This patch adds new methods in Koha::Library::Groups and Koha::Library.
1) For Koha::Library::Groups adds get_root_ancestor that returns all root
groups for a given search parameters, for example
Koha::Library::Groups->get_root_ancestor( { id => $group_id } )
2) For Koha::Library adds
2.1) get_hold_libraries: returns all libraries (including self) that
belongs to the same holdgroups. If $self belongs to several holdgroups
it will return a distinct list of all libraries belonging to them.
2.2) validate_hold_sibling: Returns 1 if the given parameters matches any of
the
libraries that belong to any of the holdgroups this library belongs. For
example
$library->validate_hold_sibling( { branchcode => $branchcode } )

To test:
1) apply this patch
2) prove t/db_dependent/Koha/Libraries.t t/db_dependent/LibraryGroups.t
SUCCESS => green letters :-D
3) Sign off

Sponsored-by: VOKAL

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #9 from Agustín Moyano <[hidden email]> ---
Created attachment 88142
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88142&action=edit
Bug 22284: New hold group options in smart-rules

This patch adds new options for 'Default checkout, hold and return policy'
and 'Default holds policy by item type', both in 'Hold policy' and 'Hold
pickup library match' columns

To test:
1) Go to 'Circulation and fines rules' in admin
2) Check that there are no options for hold group in 'Hold policy' and 'Hold
pickup library match' columns
3) Apply this patch
SUCCESS => in 'Hold policy' you should see 'From local hold group' option, and
in
'Hold pickup library match' you should see "Item's hold group"
4) Select any of those options and save
SUCCESS => options should be selected when page reloads
5) Sign off

Sponsored-by: VOKAL

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #10 from Agustín Moyano <[hidden email]> ---
Created attachment 88143
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88143&action=edit
Bug 22284: Control hold groups in C4::Reserves

This patch modifies C4::Reserves to control when hold group options where
selected
in smart rules.
In CanItemBeReserved adds 2 new error status messages
1) branchNotInHoldGroup: when a patron's homebranch is not in item's hold group
2) pickupNotInHoldGroup: when a selected pickup location is not in item's hold
group
Also CheckReserves is modified when item's priority is defined, to control by
hold
group when required.
Finally, IsAvailableForItemLevelRequest was also modified to control by hold
group when
required.

To test:
1) Apply this patch
2) prove t/db_dependent/Holds.t
SUCCESS => Result: PASS
3) Sign off

Sponsored-by: VOKAL

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #11 from Agustín Moyano <[hidden email]> ---
Created attachment 88144
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88144&action=edit
Bug 22284: New messages in reserve/request.tt

This patch adds new messages to 'Hold' column in 'Place a hold on a specific
item' table
Those messages are
1) Cannot place hold from patrons's library: this message appears when patron's
homebranch
is not in item's hold group
2) Pickup library is not in hold group: self explanatory

To test:
1) In library groups add a root group and check it as hold group.
2) Add a library to the group
3) In circulation and fines rules, in 'Default checkout, hold and return
policy', in Hold
policy change the value to 'From local hold group'
4) Search a patron from a different library than step 2, select one and click
'search to hold'
5) Search by location for items in the library of step 2
6) On any item, clic on 'Place hold for ...'
SUCCESS => when the page is loaded, in the 'Place a hold on a specific item',
you should see
the message "Cannot place hold from patrons's library" in 'Hold' column
7) In circulation and fines rules, in 'Default checkout, hold and return
policy', in 'Hold
policy' change the value again to 'From any library' and change 'Hold pickup
library match'
to "Item's hold group"
8) Repeat steps 4 to 6
SUCCESS => when the page is loaded, in the 'Place a hold on a specific item',
you should see
the message "Pickup library is not in hold group" in 'Hold' column
9) Sign off

Sponsored-by: VOKAL

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #12 from Agustín Moyano <[hidden email]> ---
Created attachment 88145
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88145&action=edit
Bug 22284: Opac pickup_locations

This patch modifies Koha::Libraries->pickup_location and moves most of the
logic to
Koha::Item and Koha::Biblio in preparation for api endpoints in the future.

There where 2 methods added

1) Koha::Item->pickup_locations that given a patron, returns all pickup
locations of
this item, considering hold fulfillment rules, and hold allowed rules.

2) Koha::Biblio->pickup_locations that given a patron, returns a distinct list
of
libraries returned by each of this biblio items pickup location.

Koha::Libraries->pickup_location analyzes input param and calls
Koha::Item->pickup_locations
or Koha::Biblio->pickup_locations as needed.

Also in opac-reserve.tt the way options where obtained to fill the pickup
location select
was modified to pass the patron as a parameter.

To test:
1) opac: try to place hold on a item and check that all libraries are shown in
the
pickup location select.
2) intranet: in Library groups, add 2 root groups marked as local hold group
and
add different libraries to each.
3) opac: login as a user of a library belonging to one hold group, and search
try to
place a hold on an item belongin to the other hold group.
4) intranet: in Circulation and fines rules, play with 'Hold policy' and 'Hold
pickup
library match' rules.
5) opac: On each modification of the rules reload the page.
SUCCESS => Every time you reload the page, the number of pickup locations
showed in
select varies.
6) prove t/db_dependent/Koha/Biblios.t t/db_dependent/Koha/Items.t
SUCCESS => Result: PASS
7) Sign off

Sponsored-by: VOKAL

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Tomás Cohen Arazi <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #13 from Kyle M Hall <[hidden email]> ---
Comment on attachment 88141
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88141
Bug 22284: New methods in Koha::Library::Groups and Koha::Library

Review of attachment 88141:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=22284&attachment=88141)
-----------------------------------------------------------------

::: Koha/Library.pm
@@ +26,5 @@
>  use Koha::Database;
>  use Koha::StockRotationStages;
> +use Koha::Libraries;
> +
> +use Data::Dumper qw(Dumper);

I think this needs to be removed.

@@ +115,5 @@
> +    my @hold_libraries = $self->get_hold_libraries;
> +
> +    foreach (@hold_libraries) {
> +        my $hold_library = $_;
> +        my $cond = 1;

Variable name isn't very self explanatory. What condition?

::: t/db_dependent/LibraryGroups.t
@@ +9,5 @@
>  use t::lib::TestBuilder;
>  use Koha::Database;
>  
> +use Data::Dumper;
> +

I think this also needs to be removed.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Agustín Moyano <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #88141|0                           |1
        is obsolete|                            |

--- Comment #14 from Agustín Moyano <[hidden email]> ---
Created attachment 88369
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88369&action=edit
Bug 22284: New methods in Koha::Library::Groups and Koha::Library

This patch adds new methods in Koha::Library::Groups and Koha::Library.
1) For Koha::Library::Groups adds get_root_ancestor that returns all root
groups for a given search parameters, for example
Koha::Library::Groups->get_root_ancestor( { id => $group_id } )
2) For Koha::Library adds
2.1) get_hold_libraries: returns all libraries (including self) that
belongs to the same holdgroups. If $self belongs to several holdgroups
it will return a distinct list of all libraries belonging to them.
2.2) validate_hold_sibling: Returns 1 if the given parameters matches any of
the
libraries that belong to any of the holdgroups this library belongs. For
example
$library->validate_hold_sibling( { branchcode => $branchcode } )

To test:
1) apply this patch
2) prove t/db_dependent/Koha/Libraries.t t/db_dependent/LibraryGroups.t
SUCCESS => green letters :-D
3) Sign off

Sponsored-by: VOKAL

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #15 from Agustín Moyano <[hidden email]> ---
Hello Kyle,

Unused "use" sentences removed and clarified the variable.

Sorry about that.

Thanks.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Josef Moravec <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
             Status|Needs Signoff               |Failed QA

--- Comment #16 from Josef Moravec <[hidden email]> ---
Hi Augustín,
I started to testing, overall it is looking good, I will continue on that, but
just found some issues, which should be addressed:

prove t/db_dependent/Reserves.t

#   Failed test 'CheckReserves Test 1'
#   at t/db_dependent/Reserves.t line 132.
#          got: ''
#     expected: 'Reserved'

#   Failed test 'CheckReserves() include reserve_id in its response'
#   at t/db_dependent/Reserves.t line 134.

#   Failed test 'CheckReserves Test 2'
#   at t/db_dependent/Reserves.t line 137.
#          got: ''
#     expected: 'Reserved'

#   Failed test 'CheckReserves Test 3'
#   at t/db_dependent/Reserves.t line 140.
#          got: ''
#     expected: 'Reserved'
t/db_dependent/Reserves.t .................... 59/60 # Looks like you failed 4
tests of 60.
t/db_dependent/Reserves.t .................... Dubious, test returned 4 (wstat
1024, 0x400)
Failed 4/60 subtests


prove t/db_dependent/Holds.t
#   Failed test '$branch_1 patron allowed to reserve $branch_2 item with
IndependentBranches OFF (bug 2394)'
#   at t/db_dependent/Holds.t line 270.

#   Failed test '$branch_1 patron NOT allowed to reserve $branch_2 item with
IndependentBranches ON ... (bug 2394)'
#   at t/db_dependent/Holds.t line 278.

#   Failed test '... unless canreservefromotherbranches is ON (bug 2394)'
#   at t/db_dependent/Holds.t line 285.
t/db_dependent/Holds.t .. 41/60
#   Failed test 'Hold can be trapped for damaged item with
AllowHoldsOnDamagedItems enabled'
#   at t/db_dependent/Holds.t line 309.
t/db_dependent/Holds.t .. 53/60
    #   Failed test 'Patron can reserve item with hold limit of 1, no holds
placed'
    #   at t/db_dependent/Holds.t line 594.
    #     Structures begin differing at:
    #          $got->{status} = 'branchNotInHoldGroup'
    #     $expected->{status} = 'OK'

    #   Failed test 'Patron can reserve item with 2 reserves daily cap'
    #   at t/db_dependent/Holds.t line 611.
    #     Structures begin differing at:
    #          $got->{status} = 'branchNotInHoldGroup'
    #     $expected->{status} = 'OK'

    #   Failed test 'Patron can reserve item with 2 bib level hold placed on
different days, 2 reserves daily cap'
    #   at t/db_dependent/Holds.t line 630.
    #     Structures begin differing at:
    #          $got->{status} = 'branchNotInHoldGroup'
    #     $expected->{status} = 'OK'

    #   Failed test 'Patron can reserve if holds_per_day is undef (i.e. undef
is unlimited daily cap)'
    #   at t/db_dependent/Holds.t line 649.
    #     Structures begin differing at:
    #          $got->{status} = 'branchNotInHoldGroup'
    #     $expected->{status} = 'OK'

    #   Failed test 'Patron can reserve if holds_per_day is undef (i.e. undef
is unlimited daily cap)'
    #   at t/db_dependent/Holds.t line 656.
    #     Structures begin differing at:
    #          $got->{status} = 'branchNotInHoldGroup'
    #     $expected->{status} = 'OK'
    # Looks like you failed 5 tests of 10.
t/db_dependent/Holds.t .. 58/60
#   Failed test 'CanItemBeReserved / holds_per_day tests'
#   at t/db_dependent/Holds.t line 676.
t/db_dependent/Holds.t .. 60/60 # Looks like you failed 5 tests of 60.
t/db_dependent/Holds.t .. Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/60 subtests

The tests needs to reflect changes in C4::Reserves.

The Comment 13 is not reflected yet.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #17 from Josef Moravec <[hidden email]> ---
Comment on attachment 88145
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88145
Bug 22284: Opac pickup_locations

Review of attachment 88145:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=22284&attachment=88145)
-----------------------------------------------------------------

::: Koha/Item.pm
@@ +297,5 @@
> +
> +    my $branch_control = C4::Context->preference('HomeOrHoldingBranch');
> +    my $library = $branch_control eq 'holdingbranch' ? $self->holding_branch : $self->home_branch;
> +
> +    #warn $branch_control.' '.$branchitemrule->{holdallowed}.' '.$library->branchcode.' '.$patron->branchcode;

This line should be removed

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Agustín Moyano <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Failed QA                   |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #18 from Agustín Moyano <[hidden email]> ---
Created attachment 88561
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88561&action=edit
Bug 22284: (follow-up) Remove commented warn and address test failures

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

--- Comment #19 from Agustín Moyano <[hidden email]> ---
(In reply to Josef Moravec from comment #17)

> Comment on attachment 88145 [details] [review]
> Bug 22284: Opac pickup_locations
>
> Review of attachment 88145 [details] [review]:
> -----------------------------------------------------------------
>
> ::: Koha/Item.pm
> @@ +297,5 @@
> > +
> > +    my $branch_control = C4::Context->preference('HomeOrHoldingBranch');
> > +    my $library = $branch_control eq 'holdingbranch' ? $self->holding_branch : $self->home_branch;
> > +
> > +    #warn $branch_control.' '.$branchitemrule->{holdallowed}.' '.$library->branchcode.' '.$patron->branchcode;
>
> This line should be removed

Hello Josef,

Thanks for taking the Time to test.

Issues where addressed in follow-up.

Regarding comment #13, it was resolved in attachment 88369

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Agustín Moyano <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #88138|0                           |1
        is obsolete|                            |

--- Comment #20 from Agustín Moyano <[hidden email]> ---
Created attachment 88793
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88793&action=edit
Bug 22284: New ft_local_hold_group column, and 'holgroup' enum option

In order to add groups for holds, this patch provides a new column in
library_groups to identify them. Also provides new enum option for
hold_fulfillment_policy column of default_branch_circ_rules,
default_circ_rules, default_branch_item_rules and branch_item_rules.

To test:
1) check that there is no ft_local_hold_group column in library_groups
and that there are no 'holdgroup' enum option in hold_fulfillment_policy
in default_branch_circ_rules, default_circ_rules, default_branch_item_rules
and branch_item_rules
2) apply this patch
3) run perl installer/data/mysql/updatedatabase.pl
SUCCESS => !(step 1) ;-D
4) Sign off

Sponsored-by: VOKAL

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22284] Groups of pickup locations for holds

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Agustín Moyano <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #88139|0                           |1
        is obsolete|                            |

--- Comment #21 from Agustín Moyano <[hidden email]> ---
Created attachment 88794
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88794&action=edit
Bug 22284: (follow-up) Add schema modifications

Sponsored-by: VOKAL

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
12