Bug 7311 - Error when records have UNIMARC 461$0 or 773$0 for something other than bibnumber
Summary: Error when records have UNIMARC 461$0 or 773$0 for something other than bibnu...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 3.6
Hardware: All All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Jared Camins-Esakov
QA Contact: Ian Walls
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-02 13:26 UTC by Jared Camins-Esakov
Modified: 2013-02-07 17:01 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 7311: Only run analytics code if analytics are enabled (2.83 KB, patch)
2011-12-02 13:29 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
Bug 7311: Only run analytics code if analytics are enabled (3.87 KB, patch)
2011-12-02 13:49 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
Bug 7311: Only run analytics code if analytics are enabled (3.69 KB, patch)
2011-12-02 14:32 UTC, Sébastien Marie
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Camins-Esakov 2011-12-02 13:26:12 UTC
With the addition of the code from Bug 5528, UNIMARC 461$0 and MARC21/NORMARC 773$0 have special meanings. When you import a record that uses those subfields for different data, you will get an error in /cataloguing/additem.pl. A check should be added to be sure that EasyAnalyticalRecords is enabled before trying to handle the 461$0/773$0 as bib numbers for analytics.
Comment 1 Jared Camins-Esakov 2011-12-02 13:29:45 UTC Comment hidden (obsolete)
Comment 2 Sébastien Marie 2011-12-02 13:43:25 UTC
Comment on attachment 6531 [details] [review]
Bug 7311: Only run analytics code if analytics are enabled

The check against EasyAnalyticalRecords sysprefs is not accured, as @hostitemnumbers is used more later.

So an HTTP/500 occurs.

Global symbol "@hostitemnumbers" requires explicit package name at cataloguing/additem.pl line 601.

Thanks.
Comment 3 Jared Camins-Esakov 2011-12-02 13:49:48 UTC Comment hidden (obsolete)
Comment 4 Sébastien Marie 2011-12-02 14:01:50 UTC
Comment on attachment 6532 [details] [review]
Bug 7311: Only run analytics code if analytics are enabled

near the same problem with this one...

the problem (for the patch) is 'hostitemnumbers' is declared in first conditional. So the variable scope stop at the end of the first conditionnal.

When the second conditionnal occurs, 'hostitemnumbers' is not defined.
Comment 5 Sébastien Marie 2011-12-02 14:32:07 UTC
Created attachment 6533 [details] [review]
Bug 7311: Only run analytics code if analytics are enabled

I have refactored, amended and signed-off the patch, as my refactoring was trivial (place a variable declaration outside conditional).

If QA think another sign-off is need, please change patch status.

Thanks Jared !
Comment 6 Ian Walls 2011-12-20 20:07:05 UTC
Just adds conditional checks before proceeding with Analytics-specific code execution.  Marking as Passed QA
Comment 7 Paul Poulain 2011-12-27 17:21:38 UTC
patch pushed, please test
Comment 8 Katrin Fischer 2011-12-27 17:24:42 UTC
This should go into 3.6.x too.