Itemsearch. Search for: publication date: 2005 OR publication date: 2006 Koha doesn't take the search for 2006 into account. Only items from 2005 are shown in the search results.
Created attachment 95787 [details] [review] Bug 23970: Search by "publication date" only works if used in first field The changes made in the following commit: commit 0d2e83bca5b91376e9262b6cb0b993f09b919018 Bug 14636: Item search - fix search and sort by publication date for MARC21 was put at the wrong place. It was inside a "if $i == 1" test that impacts the first field only. Test plan: 0/ Use a MARC21 installation 1/ Search items by publication date, use twice the field using different values. For instance: publication date: 2005 OR publication date: 2006 => Without this patch you only get results for 2005 => With this patch applied you get results for both years.
Jonathan, please put in the patch title what the patch does instead of what the problem is (https://wiki.koha-community.org/wiki/Commit_messages#Examples). Maybe like "Bug 23970: Make search with "Publication date" field work at any position", and in the body explain the problem and the fix in more detail. Btw, on top of that same wiki page the "Good commit" message has the same problem that it doesn't state what the commit does.
Created attachment 95990 [details] [review] Bug 23970: Make search with "Publication date" field work at any position The changes made in the following commit: commit 0d2e83bca5b91376e9262b6cb0b993f09b919018 Bug 14636: Item search - fix search and sort by publication date for MARC21 was put at the wrong place. It was inside a "if $i == 1" test that impacts the first field only. Test plan: 0/ Use a MARC21 installation 1/ Search items by publication date, use twice the field using different values. For instance: publication date: 2005 OR publication date: 2006 => Without this patch you only get results for 2005 => With this patch applied you get results for both years.
(In reply to Joonas Kylmälä from comment #2) > Jonathan, please put in the patch title what the patch does instead of what > the problem is > (https://wiki.koha-community.org/wiki/Commit_messages#Examples). Maybe like > "Bug 23970: Make search with "Publication date" field work at any position", > and in the body explain the problem and the fix in more detail. > > Btw, on top of that same wiki page the "Good commit" message has the same > problem that it doesn't state what the commit does. I wrote that, thanks for catching me! :)
Created attachment 95991 [details] [review] Bug 23970: Make search with "Publication date" field work at any position The changes made in the following commit: commit 0d2e83bca5b91376e9262b6cb0b993f09b919018 Bug 14636: Item search - fix search and sort by publication date for MARC21 was put at the wrong place. It was inside a "if $i == 1" test that impacts the first field only. Test plan: 0/ Use a MARC21 installation 1/ Search items by publication date, use twice the field using different values. For instance: publication date: 2005 OR publication date: 2006 => Without this patch you only get results for 2005 => With this patch applied you get results for both years. Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 96061 [details] [review] Bug 23970: Make search with "Publication date" field work at any position The changes made in the following commit: commit 0d2e83bca5b91376e9262b6cb0b993f09b919018 Bug 14636: Item search - fix search and sort by publication date for MARC21 was put at the wrong place. It was inside a "if $i == 1" test that impacts the first field only. Test plan: 0/ Use a MARC21 installation 1/ Search items by publication date, use twice the field using different values. For instance: publication date: 2005 OR publication date: 2006 => Without this patch you only get results for 2005 => With this patch applied you get results for both years. Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Nice work everyone! Pushed to master for 20.05
Pushed to 19.11.01
backported to 19.05.x for 19.05.06
Hi Hayley, not sure where you are in your review, but could you consider ths for 18.11 please? My coworker originally found it testing in 18.11 - so the bug is there :)
Backported to 18.11.x for 18.11.13