Bug 40888 - and/or/not drop-downs are missing in the Advanced Search form
Summary: and/or/not drop-downs are missing in the Advanced Search form
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Emily Lamancusa (emlam)
QA Contact: Jonathan Druart
URL:
Keywords: rel_25_05_candidate
: 40902 (view as bug list)
Depends on: 38714
Blocks:
  Show dependency treegraph
 
Reported: 2025-09-26 16:06 UTC by Emily Lamancusa (emlam)
Modified: 2025-10-31 15:27 UTC (History)
5 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes an issue with the Advanced Search form. When using "More options" to enter multiple search criteria, each criteria after the first should have a drop-down allowing you to choose between "and", "or", and "not" for that line. That drop-down was missing for most lines, and this fixes that issue so that the drop-down will display correctly again.
Version(s) released in:
25.11.00,25.05.05
Circulation function:


Attachments
Advanced search missing and/or drop-downs (9.88 KB, image/png)
2025-09-26 16:06 UTC, Emily Lamancusa (emlam)
Details
Bug 40888: Fix op drop-downs in advanced search (1.51 KB, patch)
2025-09-26 18:43 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review
Bug 40888: Fix op drop-downs in advanced search (1.58 KB, patch)
2025-10-03 10:22 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Emily Lamancusa (emlam) 2025-09-26 16:06:25 UTC
Created attachment 186984 [details]
Advanced search missing and/or drop-downs

In the Advanced Search form, if "More options" is selected, each search field should have a drop-down to select between "and", "or", and "not" for that field. However, in 25.05 and main, that drop-down only appears in the first line.
Comment 1 Emily Lamancusa (emlam) 2025-09-26 18:43:38 UTC
Created attachment 187010 [details] [review]
Bug 40888: Fix op drop-downs in advanced search

To test:
1. Go to the Advanced search page
2. Click "More options"
--> Note that the first line in the "Search" section has a drop-down for
    operation (and/or/not), but subsequent lines do not. It should be
    the other way around. Also, the alignment is strange.
3. Apply patch and refresh page
--> All lines except for the first line now have an op drop-down, and
    the alignment looks correct.
Comment 2 Jonathan Druart 2025-10-03 10:22:51 UTC
Created attachment 187378 [details] [review]
Bug 40888: Fix op drop-downs in advanced search

To test:
1. Go to the Advanced search page
2. Click "More options"
--> Note that the first line in the "Search" section has a drop-down for
    operation (and/or/not), but subsequent lines do not. It should be
    the other way around. Also, the alignment is strange.
3. Apply patch and refresh page
--> All lines except for the first line now have an op drop-down, and
    the alignment looks correct.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Lucas Gass (lukeg) 2025-10-06 15:16:56 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 4 Paul Derscheid 2025-10-23 21:11:23 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 5 Emmi Takkinen 2025-10-28 13:00:57 UTC
*** Bug 40902 has been marked as a duplicate of this bug. ***
Comment 6 Baptiste Wojtkowski (bwoj) 2025-10-31 15:27:45 UTC
153 <<<<<<< HEAD
154                         [% IF loop.first %]
155                         <div class="search-term-row" style="text-indent: 4.25em;">
156                         [% ELSE %]
157                         <div class="search-term-row">
158 ||||||| parent of ae48a617473 (Bug 40888: Fix op drop-downs in advanced search)
159                             [% IF loop.first %]
160 ======
161                             [% IF !loop.first %]
162 >>>>>>> ae48a617473 (Bug 40888: Fix op drop-downs in advanced search)

Code is correct in 24.11.x, not applying