Description
Kyle M Hall
2015-07-31 18:45:12 UTC
Created attachment 46102 [details] [review] Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher This patch adds a syspref "AggressiveMatchOnISSN" allowing for a match of ISSNs with or without hyphens. It uses Business::ISSN in order to follow the use of Business::ISBN and allow for validation of ISSNs To test: 1 - Find a record in your system with an ISSN (or add one) 2 - Stage a record containing the same ISSN but lacking a hyphen 3 - Matching on ISSN should find 0 matches 4 - Repeat with no hyphen ISSN in system and hyphen ISSN in import 5 - Matching should find 0 6 - Apply patch 7 - Update datbase and install Business::ISSN 8 - Leave AggressiveMatchOnISSN as don't and repeat original tests- no change 9 - Set AggressiveMatchOnISSN as do and repeat original test 10 - You should find a match 11 - prove t/Koha.t - all tests pass Created attachment 46159 [details] [review] Bug 14629 - [QA Followup] Pass invalid ISSN through GetVariationsOfISSN This is an optional follow up depending on community opinion. While copying over the code form the ISBN portion I noticed that with aggressive matching enabled invalid ISBNs (and hence ISSNs) were being stripped from the record. I think in the case of a library exporting records, making changes, and reimporting they would expect to get a match on ISSN or ISBN whether or not the number is valid. This patch changes the subroutine to return the original ISSN in the case of it being invalid. To test: With first patch only export a record with an invalid ISSN and reimport with AggressiveMatchOnISSN enabled and match on ISSN - you should not get a match Apply this patch reimport the file and you should find a match. Created attachment 46440 [details] [review] Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher This patch adds a syspref "AggressiveMatchOnISSN" allowing for a match of ISSNs with or without hyphens. It uses Business::ISSN in order to follow the use of Business::ISBN and allow for validation of ISSNs To test: 1 - Find a record in your system with an ISSN (or add one) 2 - Stage a record containing the same ISSN but lacking a hyphen 3 - Matching on ISSN should find 0 matches 4 - Repeat with no hyphen ISSN in system and hyphen ISSN in import 5 - Matching should find 0 6 - Apply patch 7 - Update datbase and install Business::ISSN 8 - Leave AggressiveMatchOnISSN as don't and repeat original tests- no change 9 - Set AggressiveMatchOnISSN as do and repeat original test 10 - You should find a match 11 - prove t/Koha.t - all tests pass Sponsored by North Central Regional Library System (NCRL) www.ncrl.org Created attachment 48509 [details] [review] Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher This patch adds a syspref "AggressiveMatchOnISSN" allowing for a match of ISSNs with or without hyphens. It uses Business::ISSN in order to follow the use of Business::ISBN and allow for validation of ISSNs To test: 1 - Find a record in your system with an ISSN (or add one) 2 - Stage a record containing the same ISSN but lacking a hyphen 3 - Matching on ISSN should find 0 matches 4 - Repeat with no hyphen ISSN in system and hyphen ISSN in import 5 - Matching should find 0 6 - Apply patch 7 - Update datbase and install Business::ISSN 8 - Leave AggressiveMatchOnISSN as don't and repeat original tests- no change 9 - Set AggressiveMatchOnISSN as do and repeat original test 10 - You should find a match 11 - prove t/Koha.t - all tests pass Sponsored by North Central Regional Library System (NCRL) www.ncrl.org Created attachment 48510 [details] [review] Bug 14629 - [QA Followup] Pass invalid ISSN through GetVariationsOfISSN This is an optional follow up depending on community opinion. While copying over the code form the ISBN portion I noticed that with aggressive matching enabled invalid ISBNs (and hence ISSNs) were being stripped from the record. I think in the case of a library exporting records, making changes, and reimporting they would expect to get a match on ISSN or ISBN whether or not the number is valid. This patch changes the subroutine to return the original ISSN in the case of it being invalid. To test: With first patch only export a record with an invalid ISSN and reimport with AggressiveMatchOnISSN enabled and match on ISSN - you should not get a match Apply this patch reimport the file and you should find a match. Created attachment 48513 [details] [review] Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher This patch adds a syspref "AggressiveMatchOnISSN" allowing for a match of ISSNs with or without hyphens. It uses Business::ISSN in order to follow the use of Business::ISBN and allow for validation of ISSNs To test: 1 - Find a record in your system with an ISSN (or add one) 2 - Stage a record containing the same ISSN but lacking a hyphen 3 - Matching on ISSN should find 0 matches 4 - Repeat with no hyphen ISSN in system and hyphen ISSN in import 5 - Matching should find 0 6 - Apply patch 7 - Update datbase and install Business::ISSN 8 - Leave AggressiveMatchOnISSN as don't and repeat original tests- no change 9 - Set AggressiveMatchOnISSN as do and repeat original test 10 - You should find a match 11 - prove t/Koha.t - all tests pass Sponsored by North Central Regional Library System (NCRL) www.ncrl.org Created attachment 48514 [details] [review] Bug 14629 - [QA Followup] Pass invalid ISSN through GetVariationsOfISSN This is an optional follow up depending on community opinion. While copying over the code form the ISBN portion I noticed that with aggressive matching enabled invalid ISBNs (and hence ISSNs) were being stripped from the record. I think in the case of a library exporting records, making changes, and reimporting they would expect to get a match on ISSN or ISBN whether or not the number is valid. This patch changes the subroutine to return the original ISSN in the case of it being invalid. To test: With first patch only export a record with an invalid ISSN and reimport with AggressiveMatchOnISSN enabled and match on ISSN - you should not get a match Apply this patch reimport the file and you should find a match. Created attachment 48793 [details] [review] Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher This patch adds a syspref "AggressiveMatchOnISSN" allowing for a match of ISSNs with or without hyphens. It uses Business::ISSN in order to follow the use of Business::ISBN and allow for validation of ISSNs To test: 1 - Find a record in your system with an ISSN (or add one) 2 - Stage a record containing the same ISSN but lacking a hyphen 3 - Matching on ISSN should find 0 matches 4 - Repeat with no hyphen ISSN in system and hyphen ISSN in import 5 - Matching should find 0 6 - Apply patch 7 - Update datbase and install Business::ISSN 8 - Leave AggressiveMatchOnISSN as don't and repeat original tests- no change 9 - Set AggressiveMatchOnISSN as do and repeat original test 10 - You should find a match 11 - prove t/Koha.t - all tests pass Sponsored by North Central Regional Library System (NCRL) www.ncrl.org Created attachment 48794 [details] [review] Bug 14629 - [QA Followup] Pass invalid ISSN through GetVariationsOfISSN This is an optional follow up depending on community opinion. While copying over the code form the ISBN portion I noticed that with aggressive matching enabled invalid ISBNs (and hence ISSNs) were being stripped from the record. I think in the case of a library exporting records, making changes, and reimporting they would expect to get a match on ISSN or ISBN whether or not the number is valid. This patch changes the subroutine to return the original ISSN in the case of it being invalid. To test: With first patch only export a record with an invalid ISSN and reimport with AggressiveMatchOnISSN enabled and match on ISSN - you should not get a match Apply this patch reimport the file and you should find a match. Created attachment 51028 [details] [review] Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher This patch adds a syspref "AggressiveMatchOnISSN" allowing for a match of ISSNs with or without hyphens. It uses Business::ISSN in order to follow the use of Business::ISBN and allow for validation of ISSNs To test: 1 - Find a record in your system with an ISSN (or add one) 2 - Stage a record containing the same ISSN but lacking a hyphen 3 - Matching on ISSN should find 0 matches 4 - Repeat with no hyphen ISSN in system and hyphen ISSN in import 5 - Matching should find 0 6 - Apply patch 7 - Update datbase and install Business::ISSN 8 - Leave AggressiveMatchOnISSN as don't and repeat original tests- no change 9 - Set AggressiveMatchOnISSN as do and repeat original test 10 - You should find a match 11 - prove t/Koha.t - all tests pass Sponsored by North Central Regional Library System (NCRL) www.ncrl.org Signed-off-by: Chad Roseburg <croseburg@ncrl.org> Created attachment 51029 [details] [review] Bug 14629 - [QA Followup] Pass invalid ISSN through GetVariationsOfISSN This is an optional follow up depending on community opinion. While copying over the code form the ISBN portion I noticed that with aggressive matching enabled invalid ISBNs (and hence ISSNs) were being stripped from the record. I think in the case of a library exporting records, making changes, and reimporting they would expect to get a match on ISSN or ISBN whether or not the number is valid. This patch changes the subroutine to return the original ISSN in the case of it being invalid. To test: With first patch only export a record with an invalid ISSN and reimport with AggressiveMatchOnISSN enabled and match on ISSN - you should not get a match Apply this patch reimport the file and you should find a match. Signed-off-by: Chad Roseburg <croseburg@ncrl.org> Changes to sysprefs.sql are missing. Created attachment 54280 [details] [review] Bug 14629 - (QA Followup) sysprefs.sql changes libbusiness-issn-perl is only packaged for jessie, adding keyword nowheezy. (In reply to Jonathan Druart from comment #14) > libbusiness-issn-perl is only packaged for jessie, adding keyword nowheezy. Forget that, it is also packaged for wheezy. (In reply to Nicole C. Engard from comment #11) > Created attachment 51029 [details] [review] [review] > Bug 14629 - [QA Followup] Pass invalid ISSN through GetVariationsOfISSN Should not we do that for GetVariationsOfISBN as well? (In reply to Jonathan Druart from comment #16) > (In reply to Nicole C. Engard from comment #11) > > Created attachment 51029 [details] [review] [review] [review] > > Bug 14629 - [QA Followup] Pass invalid ISSN through GetVariationsOfISSN > > Should not we do that for GetVariationsOfISBN as well? If we do think this is the right way to go I will file a new bug for ISBN, I just wanted to see if there was any opposing opinion here before doing that. Adding Mirko as this adds a new dependency. Dependency is in Wheezy and Jessie, we're good to go from my side. I'll update the control file once this is pushed. QA: Looking here now Created attachment 56954 [details] [review] Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher This patch adds a syspref "AggressiveMatchOnISSN" allowing for a match of ISSNs with or without hyphens. It uses Business::ISSN in order to follow the use of Business::ISBN and allow for validation of ISSNs To test: 1 - Find a record in your system with an ISSN (or add one) 2 - Stage a record containing the same ISSN but lacking a hyphen 3 - Matching on ISSN should find 0 matches 4 - Repeat with no hyphen ISSN in system and hyphen ISSN in import 5 - Matching should find 0 6 - Apply patch 7 - Update datbase and install Business::ISSN 8 - Leave AggressiveMatchOnISSN as don't and repeat original tests- no change 9 - Set AggressiveMatchOnISSN as do and repeat original test 10 - You should find a match 11 - prove t/Koha.t - all tests pass Sponsored by North Central Regional Library System (NCRL) www.ncrl.org Signed-off-by: Chad Roseburg <croseburg@ncrl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 56955 [details] [review] Bug 14629 - [QA Followup] Pass invalid ISSN through GetVariationsOfISSN This is an optional follow up depending on community opinion. While copying over the code form the ISBN portion I noticed that with aggressive matching enabled invalid ISBNs (and hence ISSNs) were being stripped from the record. I think in the case of a library exporting records, making changes, and reimporting they would expect to get a match on ISSN or ISBN whether or not the number is valid. This patch changes the subroutine to return the original ISSN in the case of it being invalid. To test: With first patch only export a record with an invalid ISSN and reimport with AggressiveMatchOnISSN enabled and match on ISSN - you should not get a match Apply this patch reimport the file and you should find a match. Signed-off-by: Chad Roseburg <croseburg@ncrl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 56956 [details] [review] Bug 14629 - (QA Followup) sysprefs.sql changes Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 56957 [details] [review] Bug 14629: [QA Follow-up] Small tidy up Some cosmetic changes as to whitespace and one call less to Normalize. Test plan: Run t/Koha.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Looks good to me. Few small remarks. As mentioned, would be good to keep consistency between ISBN -- ISSN stuff. Returning the invalid one for ISSN will not lead to much discussion, since this is just new. I prefer it. ISBN side is not new, might raise discussion.. Using the private routine _issn is not recommended. Too bad this has a relation with the unfinished QueryParser.. I also tested with 1234-5679 (some text) You could also imagine importing 1234-5679 (text) while only having 1234-5679 in the database? Should this match or not? Depends on your length set in the rule too. Passed QA Pushed to master for 16.11, thanks Nick, Marcel! Bug 17084 now has the control file update for the dependency. |