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