Bug 28475

Summary: Searching all headings returns no results
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: SearchingAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Nick Clemens <nick>
Severity: major    
Priority: P5 - low CC: dcook, fridolin.somers, jonathan.druart, katrin.fischer, nick, tomascohen, victor, wainuiwitikapark
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:
21.05.00,20.11.07,20.05.13
Bug Depends on: 26533    
Bug Blocks:    
Attachments: Bug 28475: Fix searching all headings
Bug 28475: Fix searching all headings
Bug 28475: Fix searching all headings
Bug 28475: Fix searching all headings
Bug 28475: Fix searching all headings
Bug 28475: Fix searching all headings

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