Bug 19122 - IncludeSeeFromInSearches is broken
Summary: IncludeSeeFromInSearches is broken
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 18098
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-15 22:40 UTC by Katrin Fischer
Modified: 2017-10-18 21:24 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19122: (bug 18098 follow-up) Fix IncludeSeeFromInSearches behaviour (2.14 KB, patch)
2017-10-02 17:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
k (748 bytes, patch)
2017-10-03 00:24 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19122: (bug 18098 follow-up) Fix IncludeSeeFromInSearches behaviour (2.19 KB, patch)
2017-10-03 00:24 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19122: (bug 18098 follow-up) Fix IncludeSeeFromInSearches behaviour (2.31 KB, patch)
2017-10-03 17:22 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2017-08-15 22:40:50 UTC
The IncludeSeeFromInSearches system preference is designed so that 'See from' headings from the authorities are included when you search in the catalog. 
That means that you could find an author not only by the name printed on the book, but for example also by their pseudonym or a different spelling of their name. 

This functionality appears to be broken on master and possibly stable versions as well.

It was added by bug 7417.

To test:
- Activate IncludeSeeFromInSearches
- Catalog an authority for a person
  - main heading in 100
  - see from headings in 400
- Catalog a bibliographic record and link it to the authority
- Make sure the record is indexed
- Verify that the record can be found searching for the main heading, but not for the see from headings in the catalog
Comment 1 Katrin Fischer 2017-08-15 22:41:31 UTC
This feature is important as it makes authorities so much more useful.
Comment 2 Michael Kuhn 2017-08-16 06:48:34 UTC
This functionality was definitively working in Koha 3.20.4. It is for sure broken in Koha 16.11.4 (this was a new installation, upgraded from 16.11.0) and Koha 17.05.1 (after the upgrade from Koha 3.20.4).
Comment 3 Jonathan Druart 2017-10-02 17:10:48 UTC
Caused by
  commit 5ef1b6710e7520b844e145e248da0deeee707fde
    Bug 18098: Add an index with the count of not onloan items
Comment 4 Jonathan Druart 2017-10-02 17:15:34 UTC
Created attachment 67526 [details] [review]
Bug 19122: (bug 18098 follow-up) Fix IncludeSeeFromInSearches behaviour

The IncludeSeeFromInSearches system preference is designed so that 'See from' headings from the authorities are included when you search in the catalog.
That means that you could find an author not only by the name printed on the book, but for example also by their pseudonym or a different spelling of their name.

It was added by bug 7417.

This regression has been introduced by
  commit 5ef1b6710e7520b844e145e248da0deeee707fde
  Bug 18098: Add an index with the count of not onloan items

-        } elsif ($record_type eq 'biblio' && C4::Context->preference('IncludeSeeFromInSearches')) {
-            my $normalizer = Koha::RecordProcessor->new( { filters => 'EmbedSeeFromHeadings' } );
[...]
+            push @filters, 'IncludeSeeFromInSearches'
+                if C4::Context->preference('IncludeSeeFromInSearches');

Test plan:
- Activate IncludeSeeFromInSearches
- Catalog an authority for a person
  - main heading in 100
  - see from headings in 400
- Catalog a bibliographic record and link it to the authority
- Make sure the record is indexed
- Verify that the record can be found searching for the main heading
- Verify that the record can be found searching for the see from headings
Comment 5 Tomás Cohen Arazi 2017-10-02 18:07:10 UTC
Oops. Thank for taking care, Jonathan!
Comment 6 Katrin Fischer 2017-10-03 00:24:27 UTC
Created attachment 67535 [details] [review]
k
Comment 7 Katrin Fischer 2017-10-03 00:24:57 UTC
Created attachment 67536 [details] [review]
Bug 19122: (bug 18098 follow-up) Fix IncludeSeeFromInSearches behaviour

The IncludeSeeFromInSearches system preference is designed so that 'See from' headings from the authorities are included when you search in the catalog.
That means that you could find an author not only by the name printed on the book, but for example also by their pseudonym or a different spelling of their name.

It was added by bug 7417.

This regression has been introduced by
  commit 5ef1b6710e7520b844e145e248da0deeee707fde
  Bug 18098: Add an index with the count of not onloan items

-        } elsif ($record_type eq 'biblio' && C4::Context->preference('IncludeSeeFromInSearches')) {
-            my $normalizer = Koha::RecordProcessor->new( { filters => 'EmbedSeeFromHeadings' } );
[...]
+            push @filters, 'IncludeSeeFromInSearches'
+                if C4::Context->preference('IncludeSeeFromInSearches');

Test plan:
- Activate IncludeSeeFromInSearches
- Catalog an authority for a person
  - main heading in 100
  - see from headings in 400
- Catalog a bibliographic record and link it to the authority
- Make sure the record is indexed
- Verify that the record can be found searching for the main heading
- Verify that the record can be found searching for the see from headings

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Tomás Cohen Arazi 2017-10-03 17:22:23 UTC
Created attachment 67564 [details] [review]
Bug 19122: (bug 18098 follow-up) Fix IncludeSeeFromInSearches behaviour

The IncludeSeeFromInSearches system preference is designed so that 'See from' headings from the authorities are included when you search in the catalog.
That means that you could find an author not only by the name printed on the book, but for example also by their pseudonym or a different spelling of their name.

It was added by bug 7417.

This regression has been introduced by
  commit 5ef1b6710e7520b844e145e248da0deeee707fde
  Bug 18098: Add an index with the count of not onloan items

-        } elsif ($record_type eq 'biblio' && C4::Context->preference('IncludeSeeFromInSearches')) {
-            my $normalizer = Koha::RecordProcessor->new( { filters => 'EmbedSeeFromHeadings' } );
[...]
+            push @filters, 'IncludeSeeFromInSearches'
+                if C4::Context->preference('IncludeSeeFromInSearches');

Test plan:
- Activate IncludeSeeFromInSearches
- Catalog an authority for a person
  - main heading in 100
  - see from headings in 400
- Catalog a bibliographic record and link it to the authority
- Make sure the record is indexed
- Verify that the record can be found searching for the main heading
- Verify that the record can be found searching for the see from headings

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Yet another reason to get rid of all this functions from this script.
Comment 9 Jonathan Druart 2017-10-04 16:22:37 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 10 Fridolin SOMERS 2017-10-17 08:18:34 UTC
Pushed to 17.05.x, will be in 17.05.05.
Comment 11 Katrin Fischer 2017-10-18 21:24:57 UTC
Dependency is not in 16.11.x, this does not apply.