Bug 28475 - Searching all headings returns no results
Summary: Searching all headings returns no results
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Nick Clemens
URL:
Keywords:
Depends on: 26533
Blocks:
  Show dependency treegraph
 
Reported: 2021-05-27 15:32 UTC by Tomás Cohen Arazi
Modified: 2021-06-14 04:07 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.07,20.05.13


Attachments
Bug 28475: Fix searching all headings (1.52 KB, patch)
2021-05-27 15:42 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 28475: Fix searching all headings (1.66 KB, patch)
2021-05-27 15:43 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 28475: Fix searching all headings (1.73 KB, patch)
2021-05-27 17:32 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 28475: Fix searching all headings (1.72 KB, patch)
2021-05-27 17:34 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 28475: Fix searching all headings (1.77 KB, patch)
2021-05-27 17:46 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28475: Fix searching all headings (1.83 KB, patch)
2021-05-27 18:24 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2021-05-27 15:32:22 UTC
This is caused by bug 26533.
Comment 1 Tomás Cohen Arazi 2021-05-27 15:42:36 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2021-05-27 15:43:47 UTC
Created attachment 121457 [details] [review]
Bug 28475: Fix searching all headings

This patch fixes the value of a hidden input that was mistakenly
changed and prevents search all headings from working.

To test:
1. Open the authorities section in the OPAC
2. Choose the 'Search all headings' tab
3. Search for 'a'
=> FAIL: No results
4. Empty the search box, and make sure 'Search all headings' is selected
=> SUCCESS: There are authority records
5. Apply this patch
6. Reload the page
7. Retry 3 and 4
=> SUCCESS: Searching is back!
8. Sign off :-D

Sponsored-by: Asociación Latinoamericana de Integración
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Victor Grousset/tuxayo 2021-05-27 17:32:39 UTC
Created attachment 121458 [details] [review]
Bug 28475: Fix searching all headings

This patch fixes the value of a hidden input that was mistakenly
changed and prevents search all headings from working.

To test:
1. Open the authorities section in the staff interface
2. Choose the 'Search all headings' tab
3. Search for 'a'
=> FAIL: No results
4. Empty the search box, and make sure 'Search all headings' is selected
=> SUCCESS: There are authority records
5. Apply this patch
6. Reload the page
7. Retry 3 and 4
=> SUCCESS: Searching is back!
8. Sign off :-D

Sponsored-by: Asociación Latinoamericana de Integración
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 4 Victor Grousset/tuxayo 2021-05-27 17:33:24 UTC
It works :D

Fixed the test plan: in the OPAC => in the staff interface
Comment 5 Lucas Gass 2021-05-27 17:34:18 UTC
Created attachment 121459 [details] [review]
Bug 28475: Fix searching all headings

This patch fixes the value of a hidden input that was mistakenly
changed and prevents search all headings from working.

To test:
1. Open the authorities section in the OPAC
2. Choose the 'Search all headings' tab
3. Search for 'a'
=> FAIL: No results
4. Empty the search box, and make sure 'Search all headings' is selected
=> SUCCESS: There are authority records
5. Apply this patch
6. Reload the page
7. Retry 3 and 4
=> SUCCESS: Searching is back!
8. Sign off :-D

Sponsored-by: Asociación Latinoamericana de Integración
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>


  Current status: Signed Off
Comment 6 Nick Clemens 2021-05-27 17:46:23 UTC
Created attachment 121460 [details] [review]
Bug 28475: Fix searching all headings

This patch fixes the value of a hidden input that was mistakenly
changed and prevents search all headings from working.

To test:
1. Open the authorities section in the OPAC
2. Choose the 'Search all headings' tab
3. Search for 'a'
=> FAIL: No results
4. Empty the search box, and make sure 'Search all headings' is selected
=> SUCCESS: There are authority records
5. Apply this patch
6. Reload the page
7. Retry 3 and 4
=> SUCCESS: Searching is back!
8. Sign off :-D

Sponsored-by: Asociación Latinoamericana de Integración
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Victor Grousset/tuxayo 2021-05-27 18:01:03 UTC
There is another change after this patch. After a "all headings" search, it was going back to "Search main heading ($a only)" without the patch.
With the patch, it stays on "all headings".
It's the only non-default tab that had this issue.

I don't know why this change though.
Comment 8 Nick Clemens 2021-05-27 18:05:23 UTC
(In reply to Victor Grousset/tuxayo from comment #7)
> There is another change after this patch. After a "all headings" search, it
> was going back to "Search main heading ($a only)" without the patch.
> With the patch, it stays on "all headings".
> It's the only non-default tab that had this issue.
> 
> I don't know why this change though.

I think since we were passing an invalid index to search we couldn't match and select the correct tab on return. This behavior is the correct behavior :-)
Comment 9 Tomás Cohen Arazi 2021-05-27 18:08:00 UTC
FYI Victor's SO got lost.
Comment 10 Victor Grousset/tuxayo 2021-05-27 18:24:19 UTC
Created attachment 121461 [details] [review]
Bug 28475: Fix searching all headings

This patch fixes the value of a hidden input that was mistakenly
changed and prevents search all headings from working.

To test:
1. Open the authorities section in the OPAC
2. Choose the 'Search all headings' tab
3. Search for 'a'
=> FAIL: No results
4. Empty the search box, and make sure 'Search all headings' is selected
=> SUCCESS: There are authority records
5. Apply this patch
6. Reload the page
7. Retry 3 and 4
=> SUCCESS: Searching is back!
8. Sign off :-D

Sponsored-by: Asociación Latinoamericana de Integración
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 11 Victor Grousset/tuxayo 2021-05-27 18:24:44 UTC
(In reply to Nick Clemens from comment #8)
> I think since we were passing an invalid index to search we couldn't match
> and select the correct tab on return. This behavior is the correct behavior
> :-)

Great, thanks :D
Comment 12 David Cook 2021-05-27 23:32:18 UTC
Does Bug 26533 still work after this change?
Comment 13 Victor Grousset/tuxayo 2021-05-28 02:37:19 UTC
It quickly tested that exact match work but it turns out I didn't new the subtleties.

See bug 26533 comment 18
Comment 14 Jonathan Druart 2021-05-28 06:35:33 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 15 Fridolin Somers 2021-05-31 14:50:56 UTC
Test plan has a mistake :

1. Open the authorities section in the OPAC
=> It in is in staff interface
Comment 16 Fridolin Somers 2021-05-31 14:51:24 UTC
Pushed to 20.11.x for 20.11.07
Comment 17 Tomás Cohen Arazi 2021-06-01 17:25:23 UTC
(In reply to Fridolin Somers from comment #15)
> Test plan has a mistake :
> 
> 1. Open the authorities section in the OPAC
> => It in is in staff interface

Oops.
Comment 18 Victor Grousset/tuxayo 2021-06-02 17:17:37 UTC
Ready to backport to the new oldoldstable (20.05.x). Applied locally until getting the push rights.
Comment 19 Victor Grousset/tuxayo 2021-06-03 16:39:39 UTC
Backported: Pushed to 20.05.x branch for 20.05.13
Comment 20 wainuiwitikapark 2021-06-14 04:07:33 UTC
Not backported to 19.11.x

Couldn't reproduce the bug