Bug 40888

Summary: and/or/not drop-downs are missing in the Advanced Search form
Product: Koha Reporter: Emily Lamancusa (emlam) <emily.lamancusa>
Component: SearchingAssignee: Emily Lamancusa (emlam) <emily.lamancusa>
Status: Needs documenting --- QA Contact: Jonathan Druart <jonathan.druart>
Severity: normal    
Priority: P5 - low CC: aleisha, baptiste.wojtkowski, jonathan.druart, lucas, mteal
Version: MainKeywords: rel_25_05_candidate
Hardware: All   
OS: All   
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:
Bug Depends on: 38714    
Bug Blocks:    
Attachments: Advanced search missing and/or drop-downs
Bug 40888: Fix op drop-downs in advanced search
Bug 40888: Fix op drop-downs in advanced search

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