Summary: | Error when records have UNIMARC 461$0 or 773$0 for something other than bibnumber | ||
---|---|---|---|
Product: | Koha | Reporter: | Jared Camins-Esakov <jcamins> |
Component: | Cataloging | Assignee: | Jared Camins-Esakov <jcamins> |
Status: | CLOSED FIXED | QA Contact: | Ian Walls <koha.sekjal> |
Severity: | normal | ||
Priority: | PATCH-Sent (DO NOT USE) | CC: | katrin.fischer, paul.poulain, semarie |
Version: | 3.6 | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9566 | ||
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
Bug 7311: Only run analytics code if analytics are enabled Bug 7311: Only run analytics code if analytics are enabled |
Description
Jared Camins-Esakov
2011-12-02 13:26:12 UTC
Created attachment 6531 [details] [review] Bug 7311: Only run analytics code if analytics are enabled With the addition of the code from Bug 5528 (easy analytic record workflows), 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. Thanks to Frère Sébastien Marie for spotting this issue. 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. Created attachment 6532 [details] [review] Bug 7311: Only run analytics code if analytics are enabled With the addition of the code from Bug 5528 (easy analytic record workflows), 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. Thanks to Frère Sébastien Marie for spotting this issue. 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. 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 ! Just adds conditional checks before proceeding with Analytics-specific code execution. Marking as Passed QA patch pushed, please test This should go into 3.6.x too. |