[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Katrin Fischer  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|Pushed to master|RESOLVED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Fridolin Somers  changed:

   What|Removed |Added

 CC||fridolin.som...@biblibre.co
   ||m

--- Comment #42 from Fridolin Somers  ---
Enhancement not pushed to 23.05.x

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #41 from Tomás Cohen Arazi  ---
Pushed to master for 23.11.

Nice work everyone, thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Version(s)||23.11.00
released in||
 Status|Passed QA   |Pushed to master

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||33074


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33074
[Bug 33074] ReservesControlBranch not taken into account in opac-reserve.pl
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

David Nind  changed:

   What|Removed |Added

 Attachment #155823|0   |1
is obsolete||

--- Comment #40 from David Nind  ---
Created attachment 155827
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155827=edit
Bug 30825: Move holds_control_library to Koha::Policy::Holds

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

David Nind  changed:

   What|Removed |Added

 Attachment #155822|0   |1
is obsolete||

--- Comment #39 from David Nind  ---
Created attachment 155826
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155826=edit
Bug 30825: Remove GetReservesControlBranch in favour of
Koha::Item->holds_control_library

This patch removes the GetReservesControlBranch method, and replaces its
uses with the newly introduced method.

To test:
1. Apply this patch
2. Verify that placing holds from the OPAC works
=> SUCCESS: Things work as expected
3. Run:
   $ kshell
  k$ prove t/db_dependent/Reserves* \
   t/db_dependent/Hold* \
   t/db_dependent/Koha/Hold* \
   t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

Signed-off-by: Kyle M Hall 
Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

David Nind  changed:

   What|Removed |Added

 Attachment #155821|0   |1
is obsolete||

--- Comment #38 from David Nind  ---
Created attachment 155825
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155825=edit
Bug 30825: Add Koha::Item->holds_control_library

This simple method takes care of calculating the control branch for an
item and a patron, depending on a syspref.

It targets replacing C4::Reserves::GetReservesControlBranch

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

Signed-off-by: Kyle M Hall 
Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

David Nind  changed:

   What|Removed |Added

 Attachment #155820|0   |1
is obsolete||

--- Comment #37 from David Nind  ---
Created attachment 155824
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155824=edit
Bug 30825: Add unit tests

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 
Signed-off-by: Kyle M Hall 
Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Jonathan Druart  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #36 from Jonathan Druart  ---
Created attachment 155823
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155823=edit
Bug 30825: Move holds_control_library to Koha::Policy::Holds

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #35 from Jonathan Druart  ---
Created attachment 155822
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155822=edit
Bug 30825: Remove GetReservesControlBranch in favour of
Koha::Item->holds_control_library

This patch removes the GetReservesControlBranch method, and replaces its
uses with the newly introduced method.

To test:
1. Apply this patch
2. Verify that placing holds from the OPAC works
=> SUCCESS: Things work as expected
3. Run:
   $ kshell
  k$ prove t/db_dependent/Reserves* \
   t/db_dependent/Hold* \
   t/db_dependent/Koha/Hold* \
   t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #34 from Jonathan Druart  ---
Created attachment 155821
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155821=edit
Bug 30825: Add Koha::Item->holds_control_library

This simple method takes care of calculating the control branch for an
item and a patron, depending on a syspref.

It targets replacing C4::Reserves::GetReservesControlBranch

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #152100|0   |1
is obsolete||
 Attachment #152101|0   |1
is obsolete||
 Attachment #152102|0   |1
is obsolete||
 Attachment #152104|0   |1
is obsolete||

--- Comment #33 from Jonathan Druart  ---
Created attachment 155820
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155820=edit
Bug 30825: Add unit tests

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-09-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply
 CC||da...@davidnind.com

--- Comment #32 from David Nind  ---
The patches no longer apply... 8-(

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 30825: Add unit tests
Using index info to reconstruct a base tree...
M   t/db_dependent/Koha/Item.t
Falling back to patching base and 3-way merge...
Auto-merging t/db_dependent/Koha/Item.t
Applying: Bug 30825: Add Koha::Item->holds_control_library
Applying: Bug 30825: Remove GetReservesControlBranch in favour of
Koha::Item->holds_control_library
Using index info to reconstruct a base tree...
M   C4/Reserves.pm
M   opac/opac-reserve.pl
M   t/db_dependent/Reserves.t
Falling back to patching base and 3-way merge...
Auto-merging t/db_dependent/Reserves.t
CONFLICT (content): Merge conflict in t/db_dependent/Reserves.t
Auto-merging opac/opac-reserve.pl
CONFLICT (content): Merge conflict in opac/opac-reserve.pl
Auto-merging C4/Reserves.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 30825: Remove GetReservesControlBranch in favour of
Koha::Item->holds_control_library

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Jonathan Druart  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=33940

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #31 from Jonathan Druart  ---
I am reusing Koha::Policy in bug 33940.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #152103|0   |1
is obsolete||

--- Comment #30 from Jonathan Druart  ---
Created attachment 152104
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152104=edit
Bug 30825: Move holds_control_library to Koha::Policy::Holds

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #29 from Jonathan Druart  ---
I've rebased the patches and moved the method to a separate module,
Koha::Policy::Holds

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #28 from Jonathan Druart  ---
Created attachment 152103
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152103=edit
Bug 30825: Move holds_control_library to Koha::Policy::Holds

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #27 from Jonathan Druart  ---
Created attachment 152102
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152102=edit
Bug 30825: Remove GetReservesControlBranch in favour of
Koha::Item->holds_control_library

This patch removes the GetReservesControlBranch method, and replaces its
uses with the newly introduced method.

To test:
1. Apply this patch
2. Verify that placing holds from the OPAC works
=> SUCCESS: Things work as expected
3. Run:
   $ kshell
  k$ prove t/db_dependent/Reserves* \
   t/db_dependent/Hold* \
   t/db_dependent/Koha/Hold* \
   t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #26 from Jonathan Druart  ---
Created attachment 152101
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152101=edit
Bug 30825: Add Koha::Item->holds_control_library

This simple method takes care of calculating the control branch for an
item and a patron, depending on a syspref.

It targets replacing C4::Reserves::GetReservesControlBranch

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #135488|0   |1
is obsolete||
 Attachment #135489|0   |1
is obsolete||
 Attachment #135490|0   |1
is obsolete||

--- Comment #25 from Jonathan Druart  ---
Created attachment 152100
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152100=edit
Bug 30825: Add unit tests

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2023-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Jonathan Druart  changed:

   What|Removed |Added

 Status|In Discussion   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #24 from Kyle M Hall  ---
(In reply to Jonathan Druart from comment #16)
> To clarify: we should have class methods, from classes that don't inherited
> from Koha::Object[s].
> 
> Something like
> Koha::Policy::Reserves::holds_control_library($item, $patron)
> 
> (or that would take the ids if we don't want to fetch the objects prior to
> the call)

I think as a solution that would be sufficient but not necessary. If we always
need to have both object to resolve the answer, it's just arbitrary to choose
the item, the patron, or some third party as the "holder" of the method.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Passed QA   |In Discussion

--- Comment #23 from Tomás Cohen Arazi  ---
Setting IN DISCUSSION to avoid confusion. We need to come up with a better
design for this business stuffs.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #22 from Jonathan Druart  ---
What are your opinions on the discussion, Kyle?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #21 from Kyle M Hall  ---
Created attachment 135490
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135490=edit
Bug 30825: Remove GetReservesControlBranch in favour of
Koha::Item->holds_control_library

This patch removes the GetReservesControlBranch method, and replaces its
uses with the newly introduced method.

To test:
1. Apply this patch
2. Verify that placing holds from the OPAC works
=> SUCCESS: Things work as expected
3. Run:
   $ kshell
  k$ prove t/db_dependent/Reserves* \
   t/db_dependent/Hold* \
   t/db_dependent/Koha/Hold* \
   t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #20 from Kyle M Hall  ---
Created attachment 135489
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135489=edit
Bug 30825: Add Koha::Item->holds_control_library

This simple method takes care of calculating the control branch for an
item and a patron, depending on a syspref.

It targets replacing C4::Reserves::GetReservesControlBranch

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Kyle M Hall  changed:

   What|Removed |Added

 Attachment #135275|0   |1
is obsolete||
 Attachment #135276|0   |1
is obsolete||
 Attachment #135277|0   |1
is obsolete||
 Attachment #135281|0   |1
is obsolete||

--- Comment #19 from Kyle M Hall  ---
Created attachment 135488
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135488=edit
Bug 30825: Add unit tests

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Kyle M Hall  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #18 from Tomás Cohen Arazi  ---
(In reply to Jonathan Druart from comment #15)
> IMO this does not belong to Koha::Item. We are making our Koha objects grow
> and it will be a nightmare soon.
> This is not the responsibility of the item object, it must go on separate
> modules.

I agree. We talked about it with Martin as we felt it didn't belong here.

> I don't have something clear to suggest right now. I have asked a couple of
> months ago to have a wider discussion about those naming/namespace/etc but
> it didn't move much (cannot remember the bug report however).

It'd be interesting to find it.

I like what they are doing here about availability:
https://github.com/NatLibFi/koha-plugin-rest-di/tree/main/Koha/Plugin/Fi/KohaSuomi/DI/Koha

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Kyle M Hall  changed:

   What|Removed |Added

 QA Contact|testo...@bugs.koha-communit |k...@bywatersolutions.com
   |y.org   |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #17 from Jonathan Druart  ---
s/Reserves/Holds, obviously

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #16 from Jonathan Druart  ---
To clarify: we should have class methods, from classes that don't inherited
from Koha::Object[s].

Something like
Koha::Policy::Reserves::holds_control_library($item, $patron)

(or that would take the ids if we don't want to fetch the objects prior to the
call)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.druart+koha@gmail.
   ||com

--- Comment #15 from Jonathan Druart  ---
IMO this does not belong to Koha::Item. We are making our Koha objects grow and
it will be a nightmare soon.
This is not the responsibility of the item object, it must go on separate
modules.

I don't have something clear to suggest right now. I have asked a couple of
months ago to have a wider discussion about those naming/namespace/etc but it
didn't move much (cannot remember the bug report however).

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #14 from Martin Renvoize  ---
I worked on an alternative commit message for that last patch to clarify the
intent as I think it got a little lost.

>This patch changes the signature of Koha::Item->holds_control_library to
>accept a hashref with patron_id and patron as keys.  The patron key
>should contain a reference to a variable that may or may not already
>contain a Koha::Patron object. In the case where a Koha::Patron object
>is required and the patron reference does not yet contain such an object
>the method will fetch the patron using the patron_id passed and populate
>the reference so that future calls can now use the populated object instead
>of having to fetch it themselves too.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #13 from Martin Renvoize  ---
(In reply to Tomás Cohen Arazi from comment #12)
> (In reply to Martin Renvoize from comment #11)
> > Created attachment 135281 [details] [review] [review]
> > Bug 30825: Pass by reference
> > 
> > Not sure if this is nicer or not honestly. This changes the signature of
> > hols_control_library to accept a hashref of patron_id and patron object
> > reference. If the patron_object reference is found to be undefined and
> > our syspref requires it we populate the reference with a Koha::Patron
> > object as found from the patron_id.
> 
> I have the feeling this particular case would do better with just the
> patron_id. If we have it, good. If we have it via a Koha::Patron object,
> then $patron->id would be pretty clear to read.

That goes the other way and introduces extra DB fetches  I'd say we either
go for passing Patron objects and ensure the caller always has that.. or we
pass references so we can delay fetching.. I wouldn't go back and just pass
ID's personally.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #12 from Tomás Cohen Arazi  ---
(In reply to Martin Renvoize from comment #11)
> Created attachment 135281 [details] [review]
> Bug 30825: Pass by reference
> 
> Not sure if this is nicer or not honestly. This changes the signature of
> hols_control_library to accept a hashref of patron_id and patron object
> reference. If the patron_object reference is found to be undefined and
> our syspref requires it we populate the reference with a Koha::Patron
> object as found from the patron_id.

I have the feeling this particular case would do better with just the
patron_id. If we have it, good. If we have it via a Koha::Patron object, then
$patron->id would be pretty clear to read.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Martin Renvoize  changed:

   What|Removed |Added

 CC||k...@bywatersolutions.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #11 from Martin Renvoize  ---
Created attachment 135281
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135281=edit
Bug 30825: Pass by reference

Not sure if this is nicer or not honestly. This changes the signature of
hols_control_library to accept a hashref of patron_id and patron object
reference. If the patron_object reference is found to be undefined and
our syspref requires it we populate the reference with a Koha::Patron
object as found from the patron_id.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Victor Grousset/tuxayo  changed:

   What|Removed |Added

   Patch complexity|--- |Small patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #10 from Martin Renvoize  ---
On second look this is more involved to demonstrate than I thought...

We have:

$patron ||= Koha::Patron->find($patron_id);
$item->holds_control_library;

Which could plausibly be

$item->holds_control_library({ patron_id => $patron_id, patron =>$patron });

That would mean that if we didn't need the $patron object in the
holds_control_library call there we could save ourselves a Koha::Patron->find
call.

However, I then spotted that we do refer to $patron again lower down the
containing method.. but again, inside a syspref controlled statement.. so we
still might not need it.

That lead me to believe that a good structure would be to pass around
references.. then upon the first time we actually need the patron object we do
the fetch and populate the reference.. there onwards we have a populated ref we
can refer to in other calls.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Martin Renvoize  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #135250|0   |1
is obsolete||

--- Comment #9 from Martin Renvoize  ---
Created attachment 135277
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135277=edit
Bug 30825: Remove GetReservesControlBranch in favour of
Koha::Item->holds_control_library

This patch removes the GetReservesControlBranch method, and replaces its
uses with the newly introduced method.

To test:
1. Apply this patch
2. Verify that placing holds from the OPAC works
=> SUCCESS: Things work as expected
3. Run:
   $ kshell
  k$ prove t/db_dependent/Reserves* \
   t/db_dependent/Hold* \
   t/db_dependent/Koha/Hold* \
   t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #135249|0   |1
is obsolete||

--- Comment #8 from Martin Renvoize  ---
Created attachment 135276
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135276=edit
Bug 30825: Add Koha::Item->holds_control_library

This simple method takes care of calculating the control branch for an
item and a patron, depending on a syspref.

It targets replacing C4::Reserves::GetReservesControlBranch

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #135248|0   |1
is obsolete||

--- Comment #7 from Martin Renvoize  ---
Created attachment 135275
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135275=edit
Bug 30825: Add unit tests

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #6 from Martin Renvoize  ---
OK, this isn't a great example as we always have the patron to pass so on
second thought it kinda makes sense as you've coded it.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #5 from Tomás Cohen Arazi  ---
(In reply to Martin Renvoize from comment #4)
> I've not looked in depth yet.. but I'm wondering if we aught to start
> adopting a pattern of generally accepting Object or Identifier for passed
> params. If one already has the object it's a no brainer to pass it through
> and save a lookup. In this case I could see the potential of having to fetch
> a patron to pass in then not actually need to use it, depending on the
> pref.. which is also wasteful?
> 
> Thoughts?

In this particular case, what bothered me was that every place the method was
called, the object was already there and it got unblessed just because (it was
obviously a transition step when moving GetMember and friends to Koha::Patrons
to avoid friction).

I'd say in this particular case either is fine. We always have the object in
context anyway.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #4 from Martin Renvoize  ---
I've not looked in depth yet.. but I'm wondering if we aught to start adopting
a pattern of generally accepting Object or Identifier for passed params. If one
already has the object it's a no brainer to pass it through and save a lookup.
In this case I could see the potential of having to fetch a patron to pass in
then not actually need to use it, depending on the pref.. which is also
wasteful?

Thoughts?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Blocks||17728


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17728
[Bug 17728] Move C4::Reserves code to the Koha namespace
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #3 from Tomás Cohen Arazi  ---
Created attachment 135250
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135250=edit
Bug 30825: Remove GetReservesControlBranch in favour of
Koha::Item->holds_control_library

This patch removes the GetReservesControlBranch method, and replaces its
uses with the newly introduced method.

To test:
1. Apply this patch
2. Verify that placing holds from the OPAC works
=> SUCCESS: Things work as expected
3. Run:
   $ kshell
  k$ prove t/db_dependent/Reserves* \
   t/db_dependent/Hold* \
   t/db_dependent/Koha/Hold* \
   t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #2 from Tomás Cohen Arazi  ---
Created attachment 135249
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135249=edit
Bug 30825: Add Koha::Item->holds_control_library

This simple method takes care of calculating the control branch for an
item and a patron, depending on a syspref.

It targets replacing C4::Reserves::GetReservesControlBranch

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #1 from Tomás Cohen Arazi  ---
Created attachment 135248
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135248=edit
Bug 30825: Add unit tests

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||martin.renvoize@ptfs-europe
   ||.com,
   ||n...@bywatersolutions.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/


[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

2022-05-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

Tomás Cohen Arazi  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |tomasco...@gmail.com
   |ity.org |

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/