[Koha-bugs] [Bug 23919] Make ISSN searchable with and without hyphen

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue May 24 00:36:02 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23919

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david at davidnind.com
  Text to go in the|                            |This enhancement enables
      release notes|                            |searching by ISSN without
                   |                            |using hyphens and using a
                   |                            |space instead of the
                   |                            |hyphen. This works in the
                   |                            |advanced search (staff
                   |                            |interface and OPAC) and
                   |                            |item search (staff
                   |                            |interface).
                   |                            |
                   |                            |It is enabled
                   |                            |using a new system
                   |                            |preference,
                   |                            |SearchWithISSNVariations,
                   |                            |with two options - "don't
                   |                            |search" (the default), and
                   |                            |"search".

--- Comment #18 from David Nind <david at davidnind.com> ---
Here is an updated test plan I came up with - I'll add a sign-off shortly. I
hope this covers all the changes and things to test for!

This enhancement enables searching by ISSN without using hyphens and using a
space instead of the hyphen. This works in the advanced search (staff interface
and OPAC) and item search (staff interface).

It is enabled using a new system preference, SearchWithISSNVariations, with two
options - "don't search" (the default), and "search".

This is similar to the SearchWithISBNVariations system preference.

Test plan:
1. Search for an ISSN number with a hyphen, without a hyphen (no space), and
with a space instead of the hyphen (example record: 1064-3923 (record #359 in
test data for koha-testing-docker)):
   (a) standard search (staff inerface and OPAC) => result found with hyphen,
not found if no hyphen or space used [note: no change after patch applied]
   (b) ISSN keyword field in the advanced search (staff interface and OPAC) =>
result found, not found if no hyphen or space used
   (c) item search in the staff interface (acces from Search drop down list in
the navigation at the top of the page > Item search > field search - change to
ISSN) => result found, not found if no hyphen or space used
2. Search for SearchWithISSNVariations in the system preferences search => no
system preference found with that name.
3. Apply the patch, update the database (updatedatabase), flush_memcached,
restart_all (I also reindexed - not sure whether this is necessary:
koha-rebuild-zebra -f -v kohadev) (koha-testing-docker).
4. Search for the system preference SearchWith - system preference
SearchWithISSNVariations found, with default setting set as "don't search".
5. Check that the text for the system preference reads well (it uses similar
wording to the SearchWithISBNVariations system preference).
6. Repeat step 1 with SearchWithISSNVariations set as "don't search" => current
behavior, that is, no results found if no hyphen or space used.
7. Repeat step 1 with SearchWithISSNVariations set as "search" => should now
find the record with and without the hyphen and with a space instead of the
hyphen for steps 1(b) and 1(c).
8. Run the tests - these should pass:
   . prove t/Search/buildQuery.t
   . prove t/db_dependent/Items.t
8. Sign off.

Notes:

- I think the QA Team will probably want the commit message(s?) to follow the
guidelines for the descriptions (see
https://wiki.koha-community.org/wiki/Commit_messages#Bug.2Ffeature_description)

- Maybe an additional enhancement (as a separate bug) would be to make this
work when searching on the ISSN number in the serials search.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list