[Bug 29980] New: Validate ISBN when cataloguing bibliographic records
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Bug ID: 29980 Summary: Validate ISBN when cataloguing bibliographic records Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: aleisha@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl https://metacpan.org/pod/Business::ISBN Business::ISBN has a valid_isbn_checksum method that implements an ISBN check digit algorithm for both 10-digit and 13-digit ISBNs. Koha could adopt this to validate ISBNs when cataloguing biblios. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |aleisha@catalyst.net.nz |ity.org | Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #1 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 129984 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129984&action=edit Bug 29980: Add ValidateISBN system preference -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #2 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 129985 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129985&action=edit Bug 29980: Validate ISBNs when saving biblio records This enhancement adds a new system preference ValidateISBN. When enabled, Koha will apply a valid checksum algorithm to ISBN fields (020$a for MARC21 and 010$a for UNIMARC) to validate the ISBN when cataloguing bibliographic records. The user will be prompted to fix their invalid ISBN, or have the option to bypass the ISBN check and save anyway. This will work for both 10-digit and 13-digit ISBNs. This patch also cleans up some bad indentation in cataloguing/addbiblio.pl. To test: 1) Apply patch, update database. 2) Go to Koha administration -> global system preferences -> cataloguing tab -> Record structure heading. Note the new ValidateISBN system preference. It should be disabled by default. Leave it disabled. 3) Set marcflavour system preference to MARC21. 4) In a new tab, go to add a new biblio record, or edit an existing one. 5) Find the 020$a field and input an incorrect ISBN. Save the record and confirm the ISBN is not validated and does not block saving the record. 6) Go back to your system preferences tab. Set the ValidateISBN tab to "Validate" to enable it. 7) Go back to your cataloguing tab. Edit the record. Save the record without making any changes. 8) Confirm an Invalid ISBN error pops up, blocking you from saving. Click Continue to bypass the ISBN check and save the record with the invalid ISBN. 9) Edit the record again. Save the record without making any changes. 10) When the Invalid ISBN error pops up, this time fix the invalid ISBN, then save the record again. Confirm you are able to save the record. 11) Go back to the system preferences tab and change the marcflavour system preference to UNIMARC. Repeat the above steps, but this time use the 010$a field instead of 020$a for ISBN. Sponsored-by: Education Services Australia SCIS -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement adds a new release notes| |system preference | |ValidateISBN. When enabled, | |Koha will apply a valid | |checksum algorithm to ISBN | |fields (020$a for MARC21 | |and 010$a for UNIMARC) to | |validate the ISBN when | |cataloguing bibliographic | |records. The user will be | |prompted to fix their | |invalid ISBN, or have the | |option to bypass the ISBN | |check and save anyway. This | |will work for both 10-digit | |and 13-digit ISBNs. | | | |This | |patch also cleans up some | |bad indentation in | |cataloguing/addbiblio.pl. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 shi-yao.wang@inLibro.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |shi-yao.wang@inLibro.com --- Comment #3 from shi-yao.wang@inLibro.com --- Everything works until I switch marcflavour from MARC21 to UNIMARC. Error 500 appears when I search the catalog to continue the steps. Did the switch on origin/master and the same happens. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- If you system hasn't been set up for UNIMARC from the start, it#s to be expected that the search does not work. What will probably work: Keep your record open in cataloguing and refresh the page after switching the marcflavor. This is just a workaround so you can test this on a MARC21 system, but it should be ok. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #5 from Aleisha Amohia <aleisha@catalyst.net.nz> --- (In reply to Katrin Fischer from comment #4)
If you system hasn't been set up for UNIMARC from the start, it#s to be expected that the search does not work. What will probably work: Keep your record open in cataloguing and refresh the page after switching the marcflavor. This is just a workaround so you can test this on a MARC21 system, but it should be ok.
Thanks for this suggestion Katrin! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #6 from shi-yao.wang@inLibro.com --- I kept one tab with a record open and another tab with system preferences open. Then I switched marcflavour to UNIMARC, went to the other tab, clicked edit and then error 500 appears once again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #7 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Maybe try clicking Edit and then changing the marcflavour, so you're refreshing the page already in the editor? If that still doesn't work I'll take another look. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #8 from shi-yao.wang@inLibro.com --- I tried it and modified 010$a field but when I clicked save the same error 500 pops up. Maybe my system HAS to support UNIMARC for this to work but I don't really know. Sorry I couldn't test it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #9 from Aleisha Amohia <aleisha@catalyst.net.nz> --- No worries I'll take a look. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #10 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Looks like that error occurs because you don't have any UNIMARC records or frameworks in your Koha system. When testing for UNIMARC, try to import a UNIMARC record and test with that! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129984|0 |1 is obsolete| | --- Comment #11 from David Nind <david@davidnind.com> --- Created attachment 134432 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134432&action=edit Bug 29980: Add ValidateISBN system preference Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129985|0 |1 is obsolete| | --- Comment #12 from David Nind <david@davidnind.com> --- Created attachment 134433 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134433&action=edit Bug 29980: Validate ISBNs when saving biblio records This enhancement adds a new system preference ValidateISBN. When enabled, Koha will apply a valid checksum algorithm to ISBN fields (020$a for MARC21 and 010$a for UNIMARC) to validate the ISBN when cataloguing bibliographic records. The user will be prompted to fix their invalid ISBN, or have the option to bypass the ISBN check and save anyway. This will work for both 10-digit and 13-digit ISBNs. This patch also cleans up some bad indentation in cataloguing/addbiblio.pl. To test: 1) Apply patch, update database. 2) Go to Koha administration -> global system preferences -> cataloguing tab -> Record structure heading. Note the new ValidateISBN system preference. It should be disabled by default. Leave it disabled. 3) Set marcflavour system preference to MARC21. 4) In a new tab, go to add a new biblio record, or edit an existing one. 5) Find the 020$a field and input an incorrect ISBN. Save the record and confirm the ISBN is not validated and does not block saving the record. 6) Go back to your system preferences tab. Set the ValidateISBN tab to "Validate" to enable it. 7) Go back to your cataloguing tab. Edit the record. Save the record without making any changes. 8) Confirm an Invalid ISBN error pops up, blocking you from saving. Click Continue to bypass the ISBN check and save the record with the invalid ISBN. 9) Edit the record again. Save the record without making any changes. 10) When the Invalid ISBN error pops up, this time fix the invalid ISBN, then save the record again. Confirm you are able to save the record. 11) Go back to the system preferences tab and change the marcflavour system preference to UNIMARC. Repeat the above steps, but this time use the 010$a field instead of 020$a for ISBN. Sponsored-by: Education Services Australia SCIS Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #13 from David Nind <david@davidnind.com> --- Created attachment 134434 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134434&action=edit Screenshot - placement of error messages when other errors Testing notes (using koha-testing-docker): - I have tested in both MARC21 and UNIMARC environments. - When using koha-testing-docker you can't just change the MARC flavour. Before starting it up you need to change KOHA_MARC_FLAVOUR=marc21 in your .env file to KOHA_MARC_FLAVOUR=unimarc ; to change back to a MARC21 environment shut everything down (CTRL-C and then kd), and change it back to marc21. It is also possible to get a UNIMARC installation using the sandboxes - change the MARC flavour when you create the sandbox (see https://wiki.koha-community.org/wiki/Sandboxes). Basically, I found that I had to test in a MARC21 environment, then set up fresh in a UNIMARC one. - One thing I noted is that if there are other errors, they display ABOVE the title - see the screenshot. It may pay to check with Owen about this. To me the errors should be below the title, like happens with the invalid ISBN error message. So I don't think that is an issue for this bug. - The other thing I noted was that if a record is saved with an invalid ISBN and you then 1) edit it again 2) introduce other errors (such as deleting the 942$c Koha item type) 3) save, the invalid ISBN error doesn't display until after the other errors are resolved. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA: Please remove indentation corrections out of your regular patches. They obscure the review. Put them separately (always). Thanks :) Why dont you use Koha::NormalizeISBN and friends ? FQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Just another thought, but you may leave it for another report (since it may be adjusting your scope): What about checking if this ISBN is already used in another bib record? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Marcel de Rooy from comment #15)
Just another thought, but you may leave it for another report (since it may be adjusting your scope): What about checking if this ISBN is already used in another bib record?
I think it would not necessarily be a duplicate, if you treat different editions. I think mixing in duplicate checking would be out of scope here. We already use Business::ISBN in other places - it seems ok to me. Where would you use NormalizeIBSN? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #16)
(In reply to Marcel de Rooy from comment #15)
Just another thought, but you may leave it for another report (since it may be adjusting your scope): What about checking if this ISBN is already used in another bib record?
I think it would not necessarily be a duplicate, if you treat different editions. I think mixing in duplicate checking would be out of scope here.
Fine -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #18 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Found another thing too: Look at this piece of code: my $r = MARC::Record->new; my $f1 = MARC::Field->new('020','','', a => 'isbn1' ); my $f2 = MARC::Field->new('020','','', a => 'isbn2' ); $r->append_fields( $f1, $f2 ); my $scal = $r->subfield( '020', 'a' ); my @list = $r->subfield( '020', 'a' ); print Dumper( $scal, '-', @list ); It prints: $VAR1 = 'isbn1'; $VAR2 = '-'; $VAR3 = 'isbn1'; Which means that the following code does not work: + my @input_isbns = ( C4::Context->preference('marcflavour') eq "UNIMARC" ) ? $record->subfield('010','a') : $record->subfield('020','a'); The @input_isbns will just contain the first ISBN only. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- The previous comment illustrates why we need code that can be tested easily. We do not achieve with putting all code in scripts but by using modules. (In reply to Katrin Fischer from comment #16)
We already use Business::ISBN in other places - it seems ok to me. Where would you use NormalizeIBSN?
The intention of this remark is: let's not call Business::ISBN everywhere in scripts. Use a module where we already have that functionality. The above remark serves to illustrate my point. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Another thing while revisiting this bug: We are building tabs again, passing an invalid_isbn flag, etc. It would be better imo to put this code in a (default) cataloguing plugin with a very small ajax call (or just javascript, but then we cannot use the perl module). Earlier validation, not just at time of saving biblio record. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com --- Comment #21 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- (In reply to Marcel de Rooy from comment #20)
Another thing while revisiting this bug: We are building tabs again, passing an invalid_isbn flag, etc. It would be better imo to put this code in a (default) cataloguing plugin with a very small ajax call (or just javascript, but then we cannot use the perl module).
Earlier validation, not just at time of saving biblio record.
I agree with Marcel, also I think having a systempref for this is a bit "heavy lifting" for the task. I will try to provide a new patch with a cataloguing plugin asap. One question though, do you think the cataloguing plugin should be enabled by default? Or should just be available to use but have to be enabled/used in the cataloguing framework in use (and attached to the proper field/subfield according to your framework). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #22 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Arthur Suzuki from comment #21)
I agree with Marcel, also I think having a systempref for this is a bit "heavy lifting" for the task. I will try to provide a new patch with a cataloguing plugin asap. One question though, do you think the cataloguing plugin should be enabled by default? Or should just be available to use but have to be enabled/used in the cataloguing framework in use (and attached to the proper field/subfield according to your framework).
I would not mind having it as default in a new system. Would not recommend to change it on existing ones. Just advertize in the release notes that they can set it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #23 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 186261 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186261&action=edit Bug 29980: [alternative patch] Add a cataloguing plugin to check ISBN -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #24 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Hello, This is an alternative patch. It's a cataloguing plugin (value builder) which you can attach to any subfield to check ISBN. To test, edit the cataloguing framework and attach the value builder to any field containing an ISBN. Then when you edit the field, it will alert and say "Valid" or "Invalid" ISBN when the field looses focus. However, I don't know if it's possible for value builders to block the form submission (maybe improve the JS?). Also I've seen there are methods in Business::ISBN to fix the ISBN if only the checksum part is invalid. That could be very useful when you want to change from isbn10 to isbn13 but don't know / want to compute the checksum by hand. This is a draft patch, any ideas for improvement are welcome. (I have to submit a test plan as well...). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #25 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 186509 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186509&action=edit Bug 29980: Add a cataloguing plugin to check ISBN Test plan: - without patch login to Koha - edit a biblio and put a wrong ISBN in 020a (010a for unimarc). - leave the input field (looses focus), no warning - apply patch and do "reset_all" to make a full re-install. - edit the biblio again and put an invalid ISBN in 020a (010a for unimarc). - when you leave the input field you should have a warning saying "invalid ISBN". - the input field should turn yellow - you can still save the biblio with a wrong isbn, it is just a warning. - if you apply the patch on an existing install, you must manually link the value builder to your existing frameworks to get it working. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134432|0 |1 is obsolete| | Attachment #134433|0 |1 is obsolete| | Attachment #186261|0 |1 is obsolete| | Attachment #186509|0 |1 is obsolete| | --- Comment #26 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 186510 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186510&action=edit Bug 29980: Add a cataloguing plugin to check ISBN Test plan: - without patch login to Koha - edit a biblio and put a wrong ISBN in 020a (010a for unimarc). - leave the input field (looses focus), no warning - apply patch and do "reset_all" to make a full re-install. - edit the biblio again and put an invalid ISBN in 020a (010a for unimarc). - when you leave the input field you should have a warning saying "invalid ISBN". - the input field should turn yellow - you can still save the biblio with a wrong isbn, it is just a warning. - if you apply the patch on an existing install, you must manually link the value builder to your existing frameworks to get it working. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #27 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- (In reply to Marcel de Rooy from comment #22)
I would not mind having it as default in a new system. Would not recommend to change it on existing ones. Just advertize in the release notes that they can set it.
It is ready for testing, I've added a test plan. It will be installed on a new system, if you apply the patch before starting ktd or if you "reset_all" after applying patch the value builder will be linked with the proper marc subfield. Existing system will not get the value_builder attached, it has to be done manually in your marc framework configuration. QA scripts are not complaining, I've made the previous patches obsolete hope that's ok. Best, Arthur -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 J. Reuter <reuter@die-bonn.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 J. Reuter <reuter@die-bonn.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186510|0 |1 is obsolete| | --- Comment #28 from J. Reuter <reuter@die-bonn.de> --- Created attachment 187583 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187583&action=edit Bug 29980: Add a cataloguing plugin to check ISBN Test plan: - without patch login to Koha - edit a biblio and put a wrong ISBN in 020a (010a for unimarc). - leave the input field (looses focus), no warning - apply patch and do "reset_all" to make a full re-install. - edit the biblio again and put an invalid ISBN in 020a (010a for unimarc). - when you leave the input field you should have a warning saying "invalid ISBN". - the input field should turn yellow - you can still save the biblio with a wrong isbn, it is just a warning. - if you apply the patch on an existing install, you must manually link the value builder to your existing frameworks to get it working. Signed-off-by: Johannes Reuter <reuter@die-bonn.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187583|0 |1 is obsolete| | --- Comment #29 from Thomas Klausner <domm@plix.at> --- Created attachment 187586 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187586&action=edit Bug 29980: Add a cataloguing plugin to check ISBN Test plan: - without patch login to Koha - edit a biblio and put a wrong ISBN in 020a (010a for unimarc). - leave the input field (looses focus), no warning - apply patch and do "reset_all" to make a full re-install. - edit the biblio again and put an invalid ISBN in 020a (010a for unimarc). - when you leave the input field you should have a warning saying "invalid ISBN". - the input field should turn yellow - you can still save the biblio with a wrong isbn, it is just a warning. - if you apply the patch on an existing install, you must manually link the value builder to your existing frameworks to get it working. Signed-off-by: Johannes Reuter <reuter@die-bonn.de> Signed-off-by: Thomas Klausner <domm@plix.at> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #30 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #31 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 187709 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187709&action=edit Bug 29980: (follow-up) Fix GNU license link -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #32 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- follow-up pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #33 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Great to have that! Forgive my boldness, but could we expect a counterpart for ISSN too btw? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=41060 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 --- Comment #34 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- (In reply to Marcel de Rooy from comment #33)
Great to have that! Forgive my boldness, but could we expect a counterpart for ISSN too btw?
Just submitted Bug41060 , exact same code but for ISSN :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134434|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This enhancement adds a new |This enhancement adds a new release notes|system preference |cataloging plugin (value |ValidateISBN. When enabled, |builder) for validating |Koha will apply a valid |ISBNs. If you save a record |checksum algorithm to ISBN |with an invalid ISB, a |fields (020$a for MARC21 |browser pop-up window warns |and 010$a for UNIMARC) to |that the ISBN is invalid, |validate the ISBN when |but you can still ignore |cataloguing bibliographic |this and save the record. |records. The user will be | |prompted to fix their |For new installations, the |invalid ISBN, or have the |validate_isbn.pl plugin is |option to bypass the ISBN |added to the bibliographic |check and save anyway. This |frameworks by default for |will work for both 10-digit |020$a (MARC21) or 010$a |and 13-digit ISBNs. |(UNIMARC). | | |This patch also cleans up |For existing installations, |some bad indentation in |update your frameworks |cataloguing/addbiblio.pl. |manually. --- Comment #35 from David Nind <david@davidnind.com> --- I like this, and I've added a release note. Should the warning be in the standard warnings/errors above the record when saving a record, instead of browser pop-up message? In my view, using a browser pop-up message is inconsistent with the current pattern we use for warning/errors when editing/saving records. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This enhancement adds a new |This enhancement adds a new release notes|cataloging plugin (value |cataloging plugin (value |builder) for validating |builder) for validating |ISBNs. If you save a record |ISBNs. If you enter an |with an invalid ISB, a |invalid ISBN, a browser |browser pop-up window warns |pop-up window warns that |that the ISBN is invalid, |the ISBN is invalid, but |but you can still ignore |you can ignore this (the |this and save the record. |field is highlighted in | |yellow) and still save the |For new installations, the |record. |validate_isbn.pl plugin is | |added to the bibliographic |For new installations, the |frameworks by default for |validate_isbn.pl plugin is |020$a (MARC21) or 010$a |added to the bibliographic |(UNIMARC). |frameworks by default for | |020$a (MARC21) or 010$a |For existing installations, |(UNIMARC). |update your frameworks | |manually. |For existing installations, | |update your frameworks | |manually. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41428 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41428 [Bug 41428] validate_isbn.pl value builder contains untranslatable strings -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41524 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41524 [Bug 41524] Validate ISBN when cataloguing bibliographic records using advanced editor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting CC| |Laura.escamilla@bywatersolu | |tions.com --- Comment #36 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- This is an enhancement and will not be backported to the 25.05.x branch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org