Description
Barton Chittenden
2015-05-26 15:07:44 UTC
Created attachment 45783 [details] [review] Bug 14277 add zebra indexes for lexile that respect 521 indicator 1. Added the following indexes: Interest-age-level | 591$a ind1=1 Interest-grade-level | 591$a ind1=2 lexile-number | 591$a ind1=8 Reading-grade-level | 591$a ind1=0 Moved 'lex' from a zebra index to a ccl alias to lexile-number. Changed the handling of st-numeric in C4/Search.pm to allow for search ranges. Please provide a test plan! Created attachment 46002 [details]
Test data containing 521 8 $b Lexile $a 530
Test data.
Created attachment 46005 [details]
Test data
Query for test data:
select
biblionumber,
title,
ExtractValue( marcxml, '//datafield[@tag=521][@ind1=0]/subfield[@code="a"]' ) as 'Reading grade level',
ExtractValue( marcxml, '//datafield[@tag=521][@ind1=1]/subfield[@code="a"]' ) as 'Interest age level',
ExtractValue( marcxml, '//datafield[@tag=521][@ind1=2]/subfield[@code="a"]' ) as 'Interest grade level',
ExtractValue( marcxml, '//datafield[@tag=521][@ind1=8]/subfield[@code="a"]' ) as 'Lexile number'
from
biblioitems
inner join biblio using (biblionumber)
where
biblionumber in ( 86147 , 88090 , 89886 , 90198 , 90669 , 221316 , 221317 , 221318 , 221319 , 221320 )
+--------------+--------------------------+---------------------+--------------------+----------------------+----------------+
| biblionumber | title | Reading grade level | Interest age level | Interest grade level | Lexile number |
+--------------+--------------------------+---------------------+--------------------+----------------------+----------------+
| 86147 | Laura Ingalls Wilder | 5.0 4. 6.1 | 7-11. | 5-8 2-6. | Lexile 780 780 |
| 88090 | Poppleton forever | 1. | 4-7. | P-3. | Lexile 410 410 |
| 89886 | The music of dolphins | 6. | 11-13. | 5-9. | 560 |
| 90198 | Worth | 4.5. | 9-12. | 4-7. | T 830 |
| 90669 | Monday with a mad genius | 3.8. | 6-9. | 1-4. | 590 590 |
| 221316 | Persian cats / | 0.5. | 4-8. | K-3 0-2. | 580 |
| 221317 | Maine coon cats / | 0.5. | 4-8. | K-3 0-2. | 600 |
| 221318 | Calico cats / | 0.5. | 4-8. | K-3 0-2. | 510 |
| 221319 | Scottish fold cats / | 0.5. | 4-8. | K-3 0-2. | 550 |
| 221320 | Siamese cats / | 0.5. | 4-8. | K-3 0-2. | 480 |
+--------------+--------------------------+---------------------+--------------------+----------------------+----------------+
== TO TEST ==
Set-up:
Add the following branch codes: CES, EBE, PSM, SES, TCE, UES.
Add itemtype BOOK
Import data from attachment 46005 [details].
Re-index, search for 'title Laura Ingalls Wilder'. This should return biblionumber 86147.
Add the following to intranetuserjs
$(document).ready(function(){
//add lexile to search pull downs
$("select[name='idx']").append("<option value='lexile-number,st-numeric'>Lexile score (e.g. 600 or 550-650 )</option>");
$("select[name='idx']").append("<option value='Interest-age-level,wrdl'>Interest Age Level</option>");
$("select[name='idx']").append("<option value='Interest-grade-level,wrdl'>Interest Grade Level</option>");
$("select[name='idx']").append("<option value='Reading-grade-level,wrdl'>+Reading Grade Level</option>");
});
Test plan:
1/ Go to advanced search, select 'Lexile score'. Search for 600 . Search will fail
2/ Go to advanced search, select 'Lexile score'. Search for 500-599 . Search will fail
3/ Go to advanced search, select 'Reading grade level'. Search for 1 . Search will fail
4/ Go to advanced search, select 'Interest age level'. Search for 4-8 . Search will fail
5/ Go to advanced search, select 'Interest grade level'. Search for 1-4 . Search will fail
6/ Apply patch.
7/ Go to advanced search, select 'Lexile score'. Search for 600 .
Search will return
Title: 'Maine coon cats'
8/ Go to advanced search, select 'Lexile score'. Search for 500-599 .
Search will return
Title: 'The music of dolphins', 'Monday with a mad genius', 'Persian cats', 'Calico cats', ' Scottish fold cats'
9/ Go to advanced search, select 'Reading grade level'. Search for 1 .
Search will return
Title: 'Poppleton forever'
10/ Go to advanced search, select 'Interest age level'. Search for 4-8 .
Search will return
Title: 'Maine coon cats', 'Siamese cats', 'Persian cats', 'Calico cats', 'Scottish fold cats'
11/ Go to advanced search, select 'Interest grade level'. Search for 1-4 .
Search will return
Title: 'Monday with a mad genius'
Created attachment 46098 [details] [review] Bug 14277 add zebra indexes for lexile that respect 521 indicator 1. Added the following indexes: Interest-age-level | 591$a ind1=1 Interest-grade-level | 591$a ind1=2 lexile-number | 591$a ind1=8 Reading-grade-level | 591$a ind1=0 Moved 'lex' from a zebra index to a ccl alias to lexile-number. Changed the handling of st-numeric in C4/Search.pm to allow for search ranges. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Internal sign-off - still needs community sign-off Created attachment 48651 [details] [review] Bug 14277: add zebra indexes for lexile that respect 521 indicator 1. Added the following indexes: Interest-age-level | 591$a ind1=1 Interest-grade-level | 591$a ind1=2 lexile-number | 591$a ind1=8 Reading-grade-level | 591$a ind1=0 Moved 'lex' from a zebra index to a ccl alias to lexile-number. Changed the handling of st-numeric in C4/Search.pm to allow for search ranges. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Hi Nick and Barton Community sign-off Barton, can u take a look at the new warnings raised by t/db_dependent/Search.t with your patch? Tomás, this looks to be entirely due to the "lex" definition in GRS-1, which I think is deprecated. We can choose to either ignore the warning or remove the index, IMO. I think we should just remove the GRS-1 portion, and set it back to signed-off Created attachment 50032 [details] [review] Bug 14277 - (QA followup) changed ocurrences of 'lex' to 'lexile-number' in record.abs Edits were made to the deprecated file record.abs *solely* to quiet warnings in tests -- this makes sense until GRS-1 code is removed from Koha. Created attachment 50036 [details] [review] Bug 14277: add zebra indexes for lexile that respect 521 indicator 1. Added the following indexes: Interest-age-level | 591$a ind1=1 Interest-grade-level | 591$a ind1=2 lexile-number | 591$a ind1=8 Reading-grade-level | 591$a ind1=0 Moved 'lex' from a zebra index to a ccl alias to lexile-number. Changed the handling of st-numeric in C4/Search.pm to allow for search ranges. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> Created attachment 50037 [details] [review] Bug 14277: (QA followup) Silent GRS-1 tests changed ocurrences of 'lex' to 'lexile-number' in record.abs Edits were made to the deprecated file record.abs *solely* to quiet warnings in tests -- this makes sense until GRS-1 code is removed from Koha. Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> Pushed, will be in the May 2016 release. Thanks for your work. *** Bug 7377 has been marked as a duplicate of this bug. *** |