local search for ISBN does not work with plain numbers
Hey,
there are books with correct ISBNs in my collection e.g.:
9783492211628 and 978-3-492-21162-8
Searching for it with the plain number will not show any result.
Searching with number and "-" in it will show correct books (even when there ISBN is written without "-" in the Database).
I would like to have the same results in both cases, because my ISBN Scanner is unfortunately giving the plain number. Though adding new books to the Database searching with the plain number works like a charme.
Is it a bug or does anyone has a hint for me?
Thanks a lot!
B.
there are books with correct ISBNs in my collection e.g.:
9783492211628 and 978-3-492-21162-8
Searching for it with the plain number will not show any result.
Searching with number and "-" in it will show correct books (even when there ISBN is written without "-" in the Database).
I would like to have the same results in both cases, because my ISBN Scanner is unfortunately giving the plain number. Though adding new books to the Database searching with the plain number works like a charme.
Is it a bug or does anyone has a hint for me?
Thanks a lot!
B.
Upgrade Storage
I'd assume Zotero just searches the ISBN field like a simple string, so anything that's changed, including hyphens, will cause it to not find results.
The other way round are searchable with "-" ISBN, even when they are saved without "-".
As the ISBN EAN standard don't define the minus sign as necessary. I would expect both searches to work.
One interesting point I found out, if you replace "-" with " " empty space the search is working. Just not with no space or minus signs. Mixed search for "978 3 492 -21162-8" also works.
So I'll probably open a bug report in the git project.
Thanks for Zotero and this Forum! :)
p.s.: The search field in the zotero webclient, ignores ISBN field completely.
Having no clue how zotero is programmed (seems like Javascript in bundled browser package) would you please give me a link to the part of the source where the search is handled.
The relevant code is mostly here:
https://github.com/zotero/zotero/blob/main/chrome/content/zotero/elements/zoteroSearch.js
Technically speaking the search function returns correctly what it finds in the database. The convention looks like to store all ISBNs with "-". So a search without them must fail. A search with empty spaces between the numbers finds everything with all the numbers, which answers my question regarding the mixed search.
Please let me phrase it as a feature request: I would like to use the local search function with ISBNs formatted without "-" (like 9783492211628). This would be helpful, because some (most?) ISBN handheld scanners return the ISBN without minus signs.
Thank you ver much for your time!