Bug 32593

Summary: Item search option location breaks with only one location defined
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: lucas, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Katrin Fischer 2023-01-09 09:35:14 UTC
When there is only one location (LOC) configured, the search option for locations on item search is not generated correctly. It shows the 'all locations' option and then 3 empty (no description) entries:


    <select id="location" name="location" multiple="multiple" size="4">
      <option value="" selected="selected">
        <span>All locations</span>
      </option>
        <option value="REF"></option>
        <option value="Reference"></option>
        <option value="Reference"></option>
    </select>

As soon as a second location is configured, the list will be generated correctly.

To test:
* delete all LOC entried, but one, I left REF in the sandbox
* Go to item search
* Verify that only 'all locations displays' with 3 clickable empty entries below
* Add another LOC entry
* Verify the list now works again