Bug 17599 - Move C4::Circulation::GetIssuingRule to Koha::IssuingRules->get_effective_issuing_rule
Summary: Move C4::Circulation::GetIssuingRule to Koha::IssuingRules->get_effective_iss...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 17591 (view as bug list)
Depends on:
Blocks: 17677 17783
  Show dependency treegraph
 
Reported: 2016-11-09 16:38 UTC by Jonathan Druart
Modified: 2018-06-04 20:10 UTC (History)
2 users (show)

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


Attachments
Bug 17599 - Move C4::Circulation::GetIssuingRule to Koha::IssuingRules->get_effective_issuing_rule (30.82 KB, patch)
2016-11-09 16:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17599 - Move C4::Circulation::GetIssuingRule to Koha::IssuingRules->get_effective_issuing_rule (31.19 KB, patch)
2016-11-15 15:01 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17599: (QA followup) Remove userenv warning (1.20 KB, patch)
2016-11-15 15:28 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17599: Move C4::Circulation::GetIssuingRule to Koha::IssuingRules->get_effective_issuing_rule (30.87 KB, patch)
2016-11-15 15:35 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17599: (QA followup) Remove userenv warning (1.20 KB, patch)
2016-11-15 15:35 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17599: (QA followup) Perltidy really long lines (6.00 KB, patch)
2016-11-15 15:35 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17599: Make the tests pass (1.88 KB, patch)
2016-11-15 15:51 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2016-11-09 16:38:02 UTC
We need to move the GetIssuingRule subroutine because of the side effects it causes to use C4::Circulation from the Koha namespace (see bug 17591)
Comment 1 Jonathan Druart 2016-11-09 16:39:19 UTC
Created attachment 57393 [details] [review]
Bug 17599 - Move C4::Circulation::GetIssuingRule to Koha::IssuingRules->get_effective_issuing_rule

This is a POC, I have not tested it yet.
Comment 2 Kyle M Hall 2016-11-15 15:01:20 UTC
Created attachment 57494 [details] [review]
Bug 17599 - Move C4::Circulation::GetIssuingRule to Koha::IssuingRules->get_effective_issuing_rule

Test Plan:
1) Apply this patch
2) Generate a test of 6 test rules using every combination of library,
    item type and patron type with different loan lengths
3) Perform a checkout of the patron type and item type
4) Note the correct rule was selected
5) Remove the most specific rule
6) Return and check out again
7) Repeat steps 4-6 until you have tested all 6 rules

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 3 Tomás Cohen Arazi 2016-11-15 15:28:53 UTC
Created attachment 57501 [details] [review]
Bug 17599: (QA followup) Remove userenv warning

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Tomás Cohen Arazi 2016-11-15 15:35:36 UTC
Created attachment 57502 [details] [review]
Bug 17599: Move C4::Circulation::GetIssuingRule to Koha::IssuingRules->get_effective_issuing_rule

This is a POC, I have not tested it yet.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Tomás Cohen Arazi 2016-11-15 15:35:43 UTC
Created attachment 57503 [details] [review]
Bug 17599: (QA followup) Remove userenv warning

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Tomás Cohen Arazi 2016-11-15 15:35:49 UTC
Created attachment 57504 [details] [review]
Bug 17599: (QA followup) Perltidy really long lines

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Kyle M Hall 2016-11-15 15:42:47 UTC
Pushed to master for 16.11, thanks Jonathan, Tomas!
Comment 8 Jonathan Druart 2016-11-15 15:51:14 UTC
Created attachment 57506 [details] [review]
Bug 17599: Make the tests pass

If you run TooMany or MultiplePerRecord.t after
t/db_dependent/Circulation/Returns.t (for instance) and that you are
running memcached, item-level_itypes will be 0.
These tests assume that the pref is 1
Comment 9 Kyle M Hall 2016-11-15 15:54:54 UTC
(In reply to Jonathan Druart from comment #8)
> Created attachment 57506 [details] [review] [review]
> Bug 17599: Make the tests pass
> 
> If you run TooMany or MultiplePerRecord.t after
> t/db_dependent/Circulation/Returns.t (for instance) and that you are
> running memcached, item-level_itypes will be 0.
> These tests assume that the pref is 1

Followup pushed to master for 16.11, thanks Jonathan!
Comment 10 Jonathan Druart 2016-11-15 16:10:31 UTC
(In reply to Jonathan Druart from comment #8)
> Created attachment 57506 [details] [review] [review]
> Bug 17599: Make the tests pass

See bug 17633 for a complete fix.
Comment 11 Jonathan Druart 2016-12-05 12:47:43 UTC
*** Bug 17591 has been marked as a duplicate of this bug. ***