Bug 17591

Summary: Use fully qualified C4::Items function names in C4::Circulation
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi <tomascohen>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: jonathan.druart, kyle, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17599
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17600
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 14610    
Bug Blocks:    
Attachments: Bug 17591: Use fully qualified C4::Items function names in C4::Circulation
[SIGNED-OFF] Bug 17591: Use fully qualified C4::Items function names in C4::Circulation
Bug 17591: Use fully qualified C4::Items function names in C4::Reserves

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 ***