Bug 38514

Summary: Filter out autocomplete list of authorities with ConsiderHeadingUse
Product: Koha Reporter: Roman Dolny <roman.dolny>
Component: MARC Authority data supportAssignee: Janusz Kaczmarek <januszop>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P3 CC: januszop
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 38494    
Bug Blocks:    
Attachments: Bug 38514: Filter out autocomplete list of authorities with ConsiderHeadingUse
Bug 38514: Filter out autocomplete list of authorities with ConsiderHeadingUse

Description Roman Dolny 2024-11-22 09:18:50 UTC
After adding ConsiderHeadingUse system preference we can limit search results of authority finder plugin to authorities useable in specyfic type of fields (based on 008/14-16 data in authorities record).

It would be nice to use the ConsiderHeadingUse system preference to filter out the autocomplete list of authorities when using authority finder plugin.

To reproduce in standard KTD:
1. Apply Bug 38494.
2. Set ConsiderHeadingUse system preference to "Do".
3. Go to the Cataloging editor and open the authority finder plugin for the 650 field.
4. Type "Application" in "Search main heading ($a only)" field.
5. Notice two autocomplete values: "Application program interfaces (Computer software)" and "Application software".
6. Click search button.
7. There is only one result: "Application program interfaces (Computer software)".

The expected behaviour is to filter out non-useable authorities from autocomplete list.
Comment 1 Janusz Kaczmarek 2024-11-22 23:27:59 UTC
Created attachment 174954 [details] [review]
Bug 38514: Filter out autocomplete list of authorities with ConsiderHeadingUse

After adding ConsiderHeadingUse system preference we can limit search
results of authority finder plugin to authorities useable in specyfic
type of fields (based on 008/14-16 data in authorities record).

The autocomplete feature in auth_finder.pl should obey the ConsiderHeadingUse
setting.

Test plan:
==========
0. Have a standard KTD enviromnent.
1. Apply Bug 38494.
2. Set ConsiderHeadingUse system preference to "Don't", ShowHeadingUse to
   'Show'.
3. Go to the Cataloging editor and open the authority finder plugin for
   the 650 field.
4. Type "Application" in "Search main heading ($a only)" field.
5. Notice two autocomplete values: "Application program interfaces
   (Computer software)" and "Application software".
6. Click search button.
7. There are two result: "Application program interfaces (Computer
   software)" (the one with 'v' Subject in Heading Use column) and
   Application software Development (with 'x' Subject in Heading Use
   column).
8. Close the authority finder window, cancel the editor. Set
   ConsiderHeadingUse system preference to "Do".
9. Go to the Cataloging editor and open the authority finder plugin for
   the 650 field.
10. Type "Application" in "Search main heading ($a only)" field.
11. Notice two autocomplete values: "Application program interfaces
   (Computer software)" and "Application software".
12. Click search button.
13. There is only one result: "Application program interfaces (Computer
   software)" (the one with 'v' Subject in Heading Use column).
   So we get only one result but there were two autocomplete hints.
14. Apply the patch ; restart all ; clear the browser js cache (or go to
    a private browser window).
15. Repeat p. 9-10.
16. Notice that there is only one autocomplete hint: "Application
   program interfaces (Computer software)".
17. Click search button.
18. There is only one result: "Application program interfaces (Computer
   software)" (the one with 'v' Subject in Heading Use column).
Comment 2 Roman Dolny 2024-11-23 08:56:17 UTC
Created attachment 174956 [details] [review]
Bug 38514: Filter out autocomplete list of authorities with ConsiderHeadingUse

After adding ConsiderHeadingUse system preference we can limit search
results of authority finder plugin to authorities useable in specyfic
type of fields (based on 008/14-16 data in authorities record).

The autocomplete feature in auth_finder.pl should obey the ConsiderHeadingUse
setting.

Test plan:
==========
0. Have a standard KTD enviromnent.
1. Apply Bug 38494.
2. Set ConsiderHeadingUse system preference to "Don't", ShowHeadingUse to
   'Show'.
3. Go to the Cataloging editor and open the authority finder plugin for
   the 650 field.
4. Type "Application" in "Search main heading ($a only)" field.
5. Notice two autocomplete values: "Application program interfaces
   (Computer software)" and "Application software".
6. Click search button.
7. There are two result: "Application program interfaces (Computer
   software)" (the one with 'v' Subject in Heading Use column) and
   Application software Development (with 'x' Subject in Heading Use
   column).
8. Close the authority finder window, cancel the editor. Set
   ConsiderHeadingUse system preference to "Do".
9. Go to the Cataloging editor and open the authority finder plugin for
   the 650 field.
10. Type "Application" in "Search main heading ($a only)" field.
11. Notice two autocomplete values: "Application program interfaces
   (Computer software)" and "Application software".
12. Click search button.
13. There is only one result: "Application program interfaces (Computer
   software)" (the one with 'v' Subject in Heading Use column).
   So we get only one result but there were two autocomplete hints.
14. Apply the patch ; restart all ; clear the browser js cache (or go to
    a private browser window).
15. Repeat p. 9-10.
16. Notice that there is only one autocomplete hint: "Application
   program interfaces (Computer software)".
17. Click search button.
18. There is only one result: "Application program interfaces (Computer
   software)" (the one with 'v' Subject in Heading Use column).

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>