Bug 17201 - Remaining calls to C4::Context->marcfromkohafield
Summary: Remaining calls to C4::Context->marcfromkohafield
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 16431
Blocks: 17204
  Show dependency treegraph
 
Reported: 2016-08-26 10:35 UTC by Nick Clemens
Modified: 2017-12-07 22:15 UTC (History)
5 users (show)

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


Attachments
Bug 17201: (bug 16431 follow-up) Remove occurrence of marcfromkohafield (1.01 KB, patch)
2016-08-26 12:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17201: (bug 16431 follow-up2) Remove occurrence of marcfromkohafield (8.57 KB, patch)
2016-08-26 12:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17201: (bug 16431 follow-up) Remove occurrence of marcfromkohafield (1.48 KB, patch)
2016-08-26 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17201: (bug 16431 follow-up2) Remove occurrence of marcfromkohafield (8.57 KB, patch)
2016-08-26 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17201: (bug 16431 follow-up) Remove occurrence of marcfromkohafield (1.54 KB, patch)
2016-08-26 13:39 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 17201: (bug 16431 follow-up2) Remove occurrence of marcfromkohafield (8.63 KB, patch)
2016-08-26 13:40 UTC, Nick Clemens
Details | Diff | Splinter Review
[PASSED QA] Bug 17201: (bug 16431 follow-up) Remove occurrence of marcfromkohafield (1.61 KB, patch)
2016-08-28 19:34 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 17201: (bug 16431 follow-up2) Remove occurrence of marcfromkohafield (8.70 KB, patch)
2016-08-28 19:35 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 17201: (bug 16431 follow-up2) Remove occurrence of marcfromkohafield (8.69 KB, patch)
2016-08-29 14:48 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 Nick Clemens 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 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 2016-08-26 13:39:29 UTC Comment hidden (obsolete)
Comment 8 Nick Clemens 2016-08-26 13:40:00 UTC Comment hidden (obsolete)
Comment 9 Nick Clemens 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 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.