Bug 17201

Summary: Remaining calls to C4::Context->marcfromkohafield
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: CatalogingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: f.demians, jonathan.druart, kyle, m.de.rooy, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 16431    
Bug Blocks: 17204    
Attachments: Bug 17201: (bug 16431 follow-up) Remove occurrence of marcfromkohafield
Bug 17201: (bug 16431 follow-up2) Remove occurrence of marcfromkohafield
Bug 17201: (bug 16431 follow-up) Remove occurrence of marcfromkohafield
Bug 17201: (bug 16431 follow-up2) Remove occurrence of marcfromkohafield
Bug 17201: (bug 16431 follow-up) Remove occurrence of marcfromkohafield
Bug 17201: (bug 16431 follow-up2) Remove occurrence of marcfromkohafield
[PASSED QA] Bug 17201: (bug 16431 follow-up) Remove occurrence of marcfromkohafield
[PASSED QA] Bug 17201: (bug 16431 follow-up2) Remove occurrence of marcfromkohafield
[PASSED QA] Bug 17201: (bug 16431 follow-up2) Remove occurrence of marcfromkohafield

Description Nick Clemens (kidclamp) 2016-08-26 10:35:32 UTC
Bug 16341 moved caching for marc subfield structure to Koha:::Cache and removed the global variable C4::Context->marcfromkohafield. 

Two scripts with calls for this variable remain in the code:

t/db_dependent/Search.t

and

Koha/MetadataRecord.pm
Comment 1 Jonathan Druart 2016-08-26 12:33:40 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-08-26 12:37:33 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-08-26 12:39:02 UTC
Second patch will fix the Search.t tests and make Jenkins happy!
Comment 4 Nick Clemens (kidclamp) 2016-08-26 12:57:27 UTC
Tests work! Huzzah!

For MetadataRecord.pm:
1 - you need to use or specify namespace for GetMarcSubfieldStructure
2 - my ($tag, $subfield) = @$tagfield; doesn't work
Comment 5 Jonathan Druart 2016-08-26 13:30:18 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2016-08-26 13:30:22 UTC Comment hidden (obsolete)
Comment 7 Nick Clemens (kidclamp) 2016-08-26 13:39:29 UTC Comment hidden (obsolete)
Comment 8 Nick Clemens (kidclamp) 2016-08-26 13:40:00 UTC Comment hidden (obsolete)
Comment 9 Nick Clemens (kidclamp) 2016-08-26 13:43:54 UTC
To test:
Disable plack (bug 17204)
Open advanced cataloging editor
Perform a Z39.50 search
Internal Search Error
Apply patch
Reload
Perform a Z39.50 search
Success
Comment 10 Katrin Fischer 2016-08-28 19:34:41 UTC
Created attachment 54958 [details] [review]
[PASSED QA] Bug 17201: (bug 16431 follow-up) Remove occurrence of marcfromkohafield

I am not sure this code is called so I don't know how to test it.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Comment 11 Katrin Fischer 2016-08-28 19:35:14 UTC Comment hidden (obsolete)
Comment 12 Jonathan Druart 2016-08-29 14:48:28 UTC
Created attachment 54986 [details] [review]
[PASSED QA] Bug 17201: (bug 16431 follow-up2) Remove occurrence of marcfromkohafield

I really don't know how these tests passed before 16431, the mapping was not complete.

Test plan:
  prove t/db_dependent/Search.t
should return green

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Comment 13 Jonathan Druart 2016-08-29 14:49:07 UTC
Fixed commit author name
Comment 14 Kyle M Hall (khall) 2016-09-02 15:00:03 UTC
Pushed to master for 16.11, thanks Jonathan!
Comment 15 Jonathan Druart 2016-09-07 11:32:57 UTC
Needed for 16.05.x
Comment 16 Frédéric Demians 2016-09-08 17:46:23 UTC
Pushed in 16.05. Will be in 16.05.04.