I am not sure if this is only a problem for MARC21 - it might. If you limit an item search by Year, using the pull down field and by call number, the reults are not correct. The shown publication year doesn't match what was searched for, the call number is correct in my example. Sorting the column for copyright year gives wrong results - the list changes, but the sorting is incorrect.
*** Bug 14823 has been marked as a duplicate of this bug. ***
Created attachment 45070 [details] [review] Bug 14636: Item search - fix search and sort by publication date for MARC21 Problem: MARC21/NORMARC stores the publication date in biblio.copyrightdate, but UNIMARC uses biblioitems.publicationyear. To test: - Without patch in a MARC21 installation: - Search by publication date - Verify that the results don't match the publication year you searched for. - Try sorting the table by publication year. - Verify that the sort doesn't work. - Apply patch. - Repeat both, search and sort. - Verify both work correctly now. - Repeat tests on a UNIMARC installation. - Verify both still work.
Created attachment 45071 [details] [review] Bug 14636: Item search - improving display - Changes "Publication Date" to "Publication date" in the CSV export - Fixes 'no JavaScript fallback' display to match the normal display - only show 'by' when it's UNIMARC and an author exist - show copyrightdate if publicationyear is empty To test: - Turn of Javascript in your browser before you item search. This will activate the alternative display. - For MARC21: - Verify that the author displays when existing and no 'by' is shown. - Verify that the publication date is now shown. - For UNIMARC: - Verify that 'by' only displays when there is an author to display. - Verify that the publication date is still shown. - Try the CSV export. - Verify that the CSV header now reads 'Publication date'.
Created attachment 45120 [details] [review] [SIGNED-OFF] Bug 14636: Item search - fix search and sort by publication date for MARC21 Problem: MARC21/NORMARC stores the publication date in biblio.copyrightdate, but UNIMARC uses biblioitems.publicationyear. To test: - Without patch in a MARC21 installation: - Search by publication date - Verify that the results don't match the publication year you searched for. - Try sorting the table by publication year. - Verify that the sort doesn't work. - Apply patch. - Repeat both, search and sort. - Verify both work correctly now. - Repeat tests on a UNIMARC installation. - Verify both still work. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Tested searching and sorting successfully in a MARC21 installation. DID NOT test in UNIMARC.
Created attachment 45121 [details] [review] [SIGNED-OFF] Bug 14636: Item search - improving display - Changes "Publication Date" to "Publication date" in the CSV export - Fixes 'no JavaScript fallback' display to match the normal display - only show 'by' when it's UNIMARC and an author exist - show copyrightdate if publicationyear is empty To test: - Turn of Javascript in your browser before you item search. This will activate the alternative display. - For MARC21: - Verify that the author displays when existing and no 'by' is shown. - Verify that the publication date is now shown. - For UNIMARC: - Verify that 'by' only displays when there is an author to display. - Verify that the publication date is still shown. - Try the CSV export. - Verify that the CSV header now reads 'Publication date'. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Successfully tested non-JS behavior and CSV export. DID NOT test UNIMARC.
I left this as 'needs signoff' because I think it requires a test by a UNIMARC user as well.
Even without this patch, in UNIMARC, item search by publication date does not work. It is because there is in itemsearch.tt publicationdate instead of publicationyear. May I provide a patch here ?
Created attachment 45153 [details] [review] Bug 14636: Item search - biblioitems column is publicationyear not publicationdate
Created attachment 45161 [details] [review] Bug 14636: Item search - biblioitems column is publicationyear not publicationdate
Created attachment 45168 [details] [review] Bug 14636: Item search - biblioitems column is publicationyear not publicationdate Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Thx for the follow-up!
Created attachment 45169 [details] [review] Bug 14636: Follow-up - fix typo in system preference name The preference is named "marcflavour" not "marcflavor". Without this change, search will always use "copyrightyear" and break search by publication date for UNIMARC.
Hi Fridolin - thx to your testing we found 2 more bugs. I added another follow-up and retested all patches together in MARC21 and UNIMARC. Can you please test again?
Created attachment 45304 [details] [review] Bug 14636: Item search - fix search and sort by publication date for MARC21 Problem: MARC21/NORMARC stores the publication date in biblio.copyrightdate, but UNIMARC uses biblioitems.publicationyear. To test: - Without patch in a MARC21 installation: - Search by publication date - Verify that the results don't match the publication year you searched for. - Try sorting the table by publication year. - Verify that the sort doesn't work. - Apply patch. - Repeat both, search and sort. - Verify both work correctly now. - Repeat tests on a UNIMARC installation. - Verify both still work. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Tested searching and sorting successfully in a MARC21 installation. DID NOT test in UNIMARC. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Created attachment 45305 [details] [review] Bug 14636: Item search - improving display - Changes "Publication Date" to "Publication date" in the CSV export - Fixes 'no JavaScript fallback' display to match the normal display - only show 'by' when it's UNIMARC and an author exist - show copyrightdate if publicationyear is empty To test: - Turn of Javascript in your browser before you item search. This will activate the alternative display. - For MARC21: - Verify that the author displays when existing and no 'by' is shown. - Verify that the publication date is now shown. - For UNIMARC: - Verify that 'by' only displays when there is an author to display. - Verify that the publication date is still shown. - Try the CSV export. - Verify that the CSV header now reads 'Publication date'. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Successfully tested non-JS behavior and CSV export. DID NOT test UNIMARC. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Created attachment 45306 [details] [review] Bug 14636: Item search - biblioitems column is publicationyear not publicationdate Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Thx for the follow-up! Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Created attachment 45307 [details] [review] Bug 14636: Follow-up - fix typo in system preference name The preference is named "marcflavour" not "marcflavor". Without this change, search will always use "copyrightyear" and break search by publication date for UNIMARC. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
I signoff for UNIMARC, works perfect
Created attachment 45315 [details] [review] Bug 14636: Item search - fix search and sort by publication date for MARC21 Problem: MARC21/NORMARC stores the publication date in biblio.copyrightdate, but UNIMARC uses biblioitems.publicationyear. To test: - Without patch in a MARC21 installation: - Search by publication date - Verify that the results don't match the publication year you searched for. - Try sorting the table by publication year. - Verify that the sort doesn't work. - Apply patch. - Repeat both, search and sort. - Verify both work correctly now. - Repeat tests on a UNIMARC installation. - Verify both still work. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Tested searching and sorting successfully in a MARC21 installation. DID NOT test in UNIMARC. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 45316 [details] [review] Bug 14636: Item search - improving display - Changes "Publication Date" to "Publication date" in the CSV export - Fixes 'no JavaScript fallback' display to match the normal display - only show 'by' when it's UNIMARC and an author exist - show copyrightdate if publicationyear is empty To test: - Turn of Javascript in your browser before you item search. This will activate the alternative display. - For MARC21: - Verify that the author displays when existing and no 'by' is shown. - Verify that the publication date is now shown. - For UNIMARC: - Verify that 'by' only displays when there is an author to display. - Verify that the publication date is still shown. - Try the CSV export. - Verify that the CSV header now reads 'Publication date'. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Successfully tested non-JS behavior and CSV export. DID NOT test UNIMARC. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 45317 [details] [review] Bug 14636: Item search - biblioitems column is publicationyear not publicationdate Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Thx for the follow-up! Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 45318 [details] [review] Bug 14636: Follow-up - fix typo in system preference name The preference is named "marcflavour" not "marcflavor". Without this change, search will always use "copyrightyear" and break search by publication date for UNIMARC. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 45319 [details] [review] Bug 14636: Remove debug message Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master! Thanks Katrin, Frido and Jonathan!
Patches pushed to 3.22.x, will be in 3.22.2
This patch has been pushed to 3.20.x, will be in 3.20.8.