Bug 17591 - Use fully qualified C4::Items function names in C4::Circulation
Summary: Use fully qualified C4::Items function names in C4::Circulation
Status: RESOLVED DUPLICATE of bug 17599
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 14610
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-08 18:03 UTC by Tomás Cohen Arazi
Modified: 2016-12-05 12:47 UTC (History)
3 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 17591: Use fully qualified C4::Items function names in C4::Circulation (9.67 KB, patch)
2016-11-08 18:11 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 17591: Use fully qualified C4::Items function names in C4::Circulation (9.74 KB, patch)
2016-11-08 19:35 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 17591: Use fully qualified C4::Items function names in C4::Reserves (1.71 KB, patch)
2016-11-09 10:11 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 Tomás Cohen Arazi 2016-11-08 18:03:29 UTC

    
Comment 1 Tomás Cohen Arazi 2016-11-08 18:11:26 UTC
Created attachment 57344 [details] [review]
Bug 17591: Use fully qualified C4::Items function names in C4::Circulation

To test:
- Run:
  $ prove prove t/db_dependent/Members/IssueSlip.t
=> FAIL: C4::Circulation is not being able to find the GetItem function.
- Apply the patch
- Run:
  $ prove prove t/db_dependent/Members/IssueSlip.t
=> SUCCESS: All green
- Sign off :-D

Sponsored-by: ByWater Solutions
Comment 2 Josef Moravec 2016-11-08 19:35:43 UTC
Created attachment 57350 [details] [review]
[SIGNED-OFF] Bug 17591: Use fully qualified C4::Items function names in C4::Circulation

To test:
- Run:
  $ prove prove t/db_dependent/Members/IssueSlip.t
=> FAIL: C4::Circulation is not being able to find the GetItem function.
- Apply the patch
- Run:
  $ prove prove t/db_dependent/Members/IssueSlip.t
=> SUCCESS: All green
- Sign off :-D

Sponsored-by: ByWater Solutions

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 3 Jonathan Druart 2016-11-09 10:09:42 UTC
I still get

t/db_dependent/Holds.t .. 1/61 Undefined subroutine &C4::Reserves::GetItem called at /home/vagrant/kohaclone/C4/Reserves.pm line 471.

I think we should fix everything in the same patchset.
Comment 4 Jonathan Druart 2016-11-09 10:11:44 UTC
Created attachment 57366 [details] [review]
Bug 17591: Use fully qualified C4::Items function names in C4::Reserves
Comment 5 Jonathan Druart 2016-11-09 10:12:29 UTC
We are doing something wrong here, we need to understand what's going wrong here and which changes caused these tests to fail.
Comment 6 Jonathan Druart 2016-11-09 10:46:29 UTC
The GetItem error from t/db_dependent/Members/IssueSlip.t is raised since:

commit bf1563e60b31244f4ea977eb84954fb8501ed59a
    Bug 14610 - Add and update modules
Comment 7 Jonathan Druart 2016-11-09 10:52:38 UTC
Hint: I have remove the 2 use C4::Circulation in Koha::Biblio and Koha::Item, the tests pass...
Comment 8 Jonathan Druart 2016-11-09 14:59:42 UTC
It also breaks t/db_dependent/Letters.t
Comment 9 Jonathan Druart 2016-11-09 15:31:40 UTC
I have tried several things and never managed to fix the original error.
I'd suggest to remove the use to C4::Circulation and move GetIssuingRule to Koha::IssuingRules.
Patch is coming (on another bug report).
Comment 10 Jonathan Druart 2016-11-09 16:39:49 UTC
(In reply to Jonathan Druart from comment #9)
> I have tried several things and never managed to fix the original error.
> I'd suggest to remove the use to C4::Circulation and move GetIssuingRule to
> Koha::IssuingRules.
> Patch is coming (on another bug report).

See bug 17599. Feel free to continue the job if you are interested.
Comment 11 Jonathan Druart 2016-11-09 16:49:06 UTC
I also tried something crazy to standardize our EXPORT, see bug 17600.
Comment 12 Jonathan Druart 2016-12-05 12:47:43 UTC
So, we finally fix the issue with bug 17599.
To continue the discussion and find a more complete solution, see bug 17600.

*** This bug has been marked as a duplicate of bug 17599 ***