Bug 20078 - Indexes 'arl' (Accelerated reading level) and 'arp' (Accelerated reading point) not usable in search menus
Summary: Indexes 'arl' (Accelerated reading level) and 'arp' (Accelerated reading poin...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Zebra (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens
QA Contact:
URL:
Keywords: Academy
: 16924 17832 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-01-23 17:59 UTC by Barton Chittenden
Modified: 2020-01-06 20:17 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 20078: Add accelerated reading indexes to getIndexes (2.50 KB, patch)
2018-02-12 11:08 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20078: Add accelerated reading indexes to getIndexes (2.44 KB, patch)
2018-09-26 14:45 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20078: (follow-up) Prevent conflict from attribute duplication (1.29 KB, patch)
2018-09-26 15:02 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20078: Add accelerated reading indexes to getIndexes (2.52 KB, patch)
2018-10-15 21:42 UTC, Barton Chittenden
Details | Diff | Splinter Review
Bug 20078: (follow-up) Prevent conflict from attribute duplication (1.38 KB, patch)
2018-10-15 21:42 UTC, Barton Chittenden
Details | Diff | Splinter Review
Bug 20078: Add accelerated reading indexes to getIndexes (2.59 KB, patch)
2018-10-26 16:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20078: (follow-up) Prevent conflict from attribute duplication (1.45 KB, patch)
2018-10-26 16:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20078: (QA follow-up) Correct attribute in PQF.pm (997 bytes, patch)
2018-10-26 16:07 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Barton Chittenden 2018-01-23 17:59:39 UTC
The indexes 'arl' (Accelerated reading level) and 'arp' (Accelerated reading point) are not listed in C4::Search::getIndexes, and therefore cannot be used in the koha drop down menus.

To re-create:

Find a bib with 526$c and 526$d populated, e.g.

+---------------+--------------+-------------+-------------+
| title         | biblionumber | 526$c (arl) | 526$d (arp) |
+---------------+--------------+-------------+-------------+
| Star flight / |         1347 | 5.5         | 14          |
+---------------+--------------+-------------+-------------+

Entering the following in the search bar works:

  arl:5.5

as does

  arp:14

However entering the following in intranetuserjs:

$(document).ready(function(){
        // Add Accelerated Reading Level to advanced search
    if (window.location.href.indexOf("catalogue/search.pl") > -1) {
        $(".advsearch").append('<option value="arl">Accelerated Reading Level</option>');
    }

    // Add Accelerated Reading Point to advanced search
    if (window.location.href.indexOf("catalogue/search.pl") > -1) {
        $(".advsearch").append('<option value="arp">Accelerated Reading Point</option>');
    }
}); 

Then running an advanced search using the respective values of Accelerated Reading Level and Accelerated Reading Point will fail.
Comment 1 Nick Clemens 2018-02-12 11:08:37 UTC Comment hidden (obsolete)
Comment 2 Nick Clemens 2018-09-26 14:45:56 UTC Comment hidden (obsolete)
Comment 3 Nick Clemens 2018-09-26 15:02:15 UTC Comment hidden (obsolete)
Comment 4 Barton Chittenden 2018-10-15 21:42:23 UTC
Created attachment 80646 [details] [review]
Bug 20078: Add accelerated reading indexes to getIndexes

To test:
1 - Find a bib with 526$c and 526$d populated, or populate them
 e.g. 526$a 5.5 | 526$d 14
2 - Try searching for 'arl:5.5' or 'arp:14'
3 - Your record should be returned in results
4 - Add the indexes as dropdowns by entering the following in intranetuserjs:
$(document).ready(function(){
        // Add Accelerated Reading Level to advanced search
    if (window.location.href.indexOf("catalogue/search.pl") > -1) {
        $(".advsearch").append('<option value="arl">Accelerated Reading Level</option>');
    }

    // Add Accelerated Reading Point to advanced search
    if (window.location.href.indexOf("catalogue/search.pl") > -1) {
        $(".advsearch").append('<option value="arp">Accelerated Reading Point</option>');
    }
});
5 - Search using these in the dropdown, your record will not be found
6 - Apply patch
7 - Repeat searches directly and by using dropdown, your record should be returned.
8 - prove t/db_dependent/Search.t

Signed-off-by: Margie Sheppard - Central Kansas Library System CKLS <msheppard@ckls.org>
Comment 5 Barton Chittenden 2018-10-15 21:42:38 UTC
Created attachment 80647 [details] [review]
Bug 20078: (follow-up) Prevent conflict from attribute duplication

To test:
1 - Apply first patch
2 - Attempt searching by arp, no results
3 - Apply this patch
4 - Copy bib1.att and ccl.properties to the correct locations
5 - Restart zebra
6 - Rebuild indexes
7 - Search agian, success!

Signed-off-by: Margie Sheppard - Central Kansas Library System CKLS <msheppard@ckls.org>
Comment 6 Katrin Fischer 2018-10-26 16:07:11 UTC
Created attachment 81308 [details] [review]
Bug 20078: Add accelerated reading indexes to getIndexes

To test:
1 - Find a bib with 526$c and 526$d populated, or populate them
 e.g. 526$a 5.5 | 526$d 14
2 - Try searching for 'arl:5.5' or 'arp:14'
3 - Your record should be returned in results
4 - Add the indexes as dropdowns by entering the following in intranetuserjs:
$(document).ready(function(){
        // Add Accelerated Reading Level to advanced search
    if (window.location.href.indexOf("catalogue/search.pl") > -1) {
        $(".advsearch").append('<option value="arl">Accelerated Reading Level</option>');
    }

    // Add Accelerated Reading Point to advanced search
    if (window.location.href.indexOf("catalogue/search.pl") > -1) {
        $(".advsearch").append('<option value="arp">Accelerated Reading Point</option>');
    }
});
5 - Search using these in the dropdown, your record will not be found
6 - Apply patch
7 - Repeat searches directly and by using dropdown, your record should be returned.
8 - prove t/db_dependent/Search.t

Signed-off-by: Margie Sheppard - Central Kansas Library System CKLS <msheppard@ckls.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2018-10-26 16:07:15 UTC
Created attachment 81309 [details] [review]
Bug 20078: (follow-up) Prevent conflict from attribute duplication

To test:
1 - Apply first patch
2 - Attempt searching by arp, no results
3 - Apply this patch
4 - Copy bib1.att and ccl.properties to the correct locations
5 - Restart zebra
6 - Rebuild indexes
7 - Search agian, success!

Signed-off-by: Margie Sheppard - Central Kansas Library System CKLS <msheppard@ckls.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2018-10-26 16:07:19 UTC
Created attachment 81310 [details] [review]
Bug 20078: (QA follow-up) Correct attribute in PQF.pm
Comment 9 Katrin Fischer 2018-10-26 16:07:41 UTC
It looks li
Comment 10 Nick Clemens 2018-11-06 17:54:35 UTC
Awesome work all!

Pushed to master for 18.11
Comment 11 Martin Renvoize 2018-11-16 12:34:26 UTC
Enhancement, will not be backported to 18.05.x series.
Comment 12 Katrin Fischer 2019-03-12 23:01:50 UTC
*** Bug 17832 has been marked as a duplicate of this bug. ***
Comment 13 Katrin Fischer 2019-03-12 23:05:03 UTC
*** Bug 16924 has been marked as a duplicate of this bug. ***