Bug 9810 - Search limit 'available' does not hide damaged, withdrawn, or not-for-loan items
Summary: Search limit 'available' does not hide damaged, withdrawn, or not-for-loan items
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low normal with 20 votes (vote)
Assignee: Kyle M Hall
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-13 15:20 UTC by Kyle M Hall
Modified: 2024-03-27 10:51 UTC (History)
15 users (show)

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


Attachments
Bug 9810 - Search limit 'available' does not hide damaged or withdrawn items (1.63 KB, patch)
2013-03-13 15:24 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9810 - Search limit 'available' does not hide damaged or withdrawn items (1.70 KB, patch)
2013-03-19 14:51 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 9810: Add indexes withdrawn and damaged for UNIMARC (1.07 KB, patch)
2013-03-20 16:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9810 [Followup] - Hide items with notforloan < 0 when limiting to available items (1.05 KB, patch)
2014-05-29 11:14 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9810 - Search limit 'available' does not hide damaged or withdrawn items (1.79 KB, patch)
2014-07-09 12:46 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 9810 [Followup] - Hide items with notforloan < 0 when limiting to available items (1.09 KB, patch)
2014-07-09 12:47 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 9810: Add index notforloan for unimarc (3.59 KB, patch)
2014-07-11 15:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9810 - Search limit 'available' does not hide damaged or withdrawn items (1.79 KB, patch)
2014-08-07 11:54 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 9810 [Followup] - Hide items with notforloan < 0 when limiting to available items (1.14 KB, patch)
2014-08-07 11:54 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 9810: Add index notforloan for unimarc (3.65 KB, patch)
2014-08-07 11:54 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 9810: Follow-up for UNIMARC notforloan item:w consistency (2.75 KB, patch)
2014-08-07 11:54 UTC, Marcel de Rooy
Details | Diff | Splinter Review
available (182.57 KB, image/png)
2020-05-27 14:32 UTC, Marjorie Barry-Vila
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2013-03-13 15:20:24 UTC

    
Comment 1 Kyle M Hall 2013-03-13 15:24:59 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2013-03-13 15:26:47 UTC
It would also be nice to hide waiting items with the availability limit, but that is more difficult. I think it would require adding a 'waiting' field to the items table, mapping it to a marc field, making sure Koha updates the field properly, adding it to the zebra indexes, and then adding it to the availability limit code.
Comment 3 Matthias Meusburger 2013-03-19 14:51:52 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2013-03-20 16:09:33 UTC
QA comment:

The patch works but not out of the box!

With an UNIMARC installation, the damaged and withdrawn indexes are not defined.
So the patch causes an empty results page.

Marked as Failed QA.
Comment 5 Jonathan Druart 2013-03-20 16:09:56 UTC
I will propose a patch for that
Comment 6 Jonathan Druart 2013-03-20 16:10:37 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2013-03-20 16:11:18 UTC
Note for RM: The zebra's index should be rebuild on each UNIMARC installation after applying these patches.

Switch back to Needs Signoff
Comment 8 Corinne BULAC 2013-03-21 10:32:19 UTC
1 - I apply this patch
2 - I create WITHDRAWN list with 0 and 1 values
3 - I change item cataloguing by introduction a 995$3 field link to this list
4 - I modify two item in filling 995$3 with witdrawn = 1
5 - Rebuild zebra index was done
6 - Items are still visible in OPAC and their status is "available"
Comment 9 Jonathan Druart 2013-03-21 11:06:56 UTC
(In reply to comment #8)
> 1 - I apply this patch
> 2 - I create WITHDRAWN list with 0 and 1 values
> 3 - I change item cataloguing by introduction a 995$3 field link to this list
> 4 - I modify two item in filling 995$3 with witdrawn = 1
> 5 - Rebuild zebra index was done
> 6 - Items are still visible in OPAC and their status is "available"

Did you apply changes to the zebra config file (record.abs)?
Comment 10 Kyle M Hall 2014-05-29 10:40:44 UTC
Comment on attachment 16542 [details] [review]
Bug 9810: Add indexes withdrawn and damaged for UNIMARC

These indexes have already been added by a different commit. This patch is no longer needed.
Comment 11 Kyle M Hall 2014-05-29 11:14:24 UTC Comment hidden (obsolete)
Comment 12 Marcel de Rooy 2014-07-09 12:46:57 UTC Comment hidden (obsolete)
Comment 13 Marcel de Rooy 2014-07-09 12:47:05 UTC Comment hidden (obsolete)
Comment 14 Marcel de Rooy 2014-07-09 12:49:25 UTC
Both patches work fine for me. But I wonder if the second patch will work for UNIMARC. (I do not find notforloan in the record.abs of UNIMARC)
Could a UNIMARC user confirm this please?
No problems for qa tools.

Changing status to Failed QA for need of clarification.
Comment 15 Marcel de Rooy 2014-07-09 13:01:01 UTC
Small additional remark (apparently outside the scope of this report but observed while testing it):
If I toggle the status of Available items and All items, the first time it works but the second time it does no longer work. As you can see below, the query contains kw: the second time, resulting in 0 hits.

First URL for limiting to available:
/cgi-bin/koha/catalogue/search.pl?q=london%20india%20%23relevance_dsc&sort_by=relevance_dsc&limit=available

Second URL:
/cgi-bin/koha/catalogue/search.pl?q=kw%3Alondon%20india%20%23relevance_dsc&sort_by=relevance_dsc&limit=available
Comment 16 Jonathan Druart 2014-07-09 13:44:41 UTC
(In reply to M. de Rooy from comment #14)
> Both patches work fine for me. But I wonder if the second patch will work
> for UNIMARC. (I do not find notforloan in the record.abs of UNIMARC)
> Could a UNIMARC user confirm this please?

The notforloan index does not seem to exist, I confirm.
I added a patch for withdrawn and damaged indexes (see comment 6).
Comment 17 Kyle M Hall 2014-07-09 14:28:56 UTC
Jonathan, with no notforloan index, does the feature fail gracefully for unimarc? That is, it may not resolve the issue, but it doesn't break anything. If so, I think we can push the patch and file a separate bug to add the notforloan index for unimarc users.

(In reply to Jonathan Druart from comment #16)
> (In reply to M. de Rooy from comment #14)
> > Both patches work fine for me. But I wonder if the second patch will work
> > for UNIMARC. (I do not find notforloan in the record.abs of UNIMARC)
> > Could a UNIMARC user confirm this please?
> 
> The notforloan index does not seem to exist, I confirm.
> I added a patch for withdrawn and damaged indexes (see comment 6).
Comment 18 Jonathan Druart 2014-07-09 14:55:31 UTC
(In reply to Kyle M Hall from comment #17)
> Jonathan, with no notforloan index, does the feature fail gracefully for
> unimarc?

I don't get an "internal server error", but the result list is empty.
Comment 19 Marcel de Rooy 2014-07-10 09:11:31 UTC
(In reply to Jonathan Druart from comment #18)
> (In reply to Kyle M Hall from comment #17)
> > Jonathan, with no notforloan index, does the feature fail gracefully for
> > unimarc?
> 
> I don't get an "internal server error", but the result list is empty.

Thanks, Jonathan.
Sorry, Kyle, but that means that this cannot pass qa in the current form. We would introduce more misinformation (no hits) for unimarc users than only showing a damaged item or so too much.
Could you adjust the follow-up and make this notforloan part non-unimarc specific?
Comment 20 Jonathan Druart 2014-07-11 15:23:20 UTC Comment hidden (obsolete)
Comment 21 Jonathan Druart 2014-07-11 15:26:39 UTC
(In reply to M. de Rooy from comment #19)
> (In reply to Jonathan Druart from comment #18)
> > (In reply to Kyle M Hall from comment #17)
> > > Jonathan, with no notforloan index, does the feature fail gracefully for
> > > unimarc?
> > 
> > I don't get an "internal server error", but the result list is empty.
> 
> Thanks, Jonathan.
> Sorry, Kyle, but that means that this cannot pass qa in the current form. We
> would introduce more misinformation (no hits) for unimarc users than only
> showing a damaged item or so too much.
> Could you adjust the follow-up and make this notforloan part non-unimarc
> specific?

I wouldn't want to see a test (if marc21 else) here. I would prefer to see this patch pushed to master. I will try to provide a patch for bug 11586 soon (that will fix the problem with the last patch).
Switch back to need QA.
Comment 22 Marcel de Rooy 2014-08-07 11:54:07 UTC
Former QA and Jonathan's last patch and a small followup for item:w-consistency between notforloan and damaged, withdrawn, etc. in unimarc setup, should altogether be sufficient to make this patch set pass QA now, while looking forward to subsequent work in bug 11586.
Comment 23 Marcel de Rooy 2014-08-07 11:54:35 UTC
Created attachment 30573 [details] [review]
Bug 9810 - Search limit 'available' does not hide damaged or withdrawn items

Test Plan:
1) Perform a search that will return an a damaged item and a withdrawn item
   ( for simplicity, have those items be the only one on each record, respectively )
2) Run the same search but limit to available items only
3) Note those items still appear in the search results
4) Apply this patch
5) Run the search again
6) Note the items no longer appear in the search results

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 24 Marcel de Rooy 2014-08-07 11:54:39 UTC
Created attachment 30574 [details] [review]
Bug 9810 [Followup] - Hide items with notforloan < 0 when limiting to available items

Not for loan statuses of less then 0 are considered 'unavailable' in
Koha parlance, whereas items with a not for loan status greater than 0
are considered available, but not checkout-able ( i.g. reference items ).

This should be taken into account by the availability filter.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 25 Marcel de Rooy 2014-08-07 11:54:42 UTC
Created attachment 30575 [details] [review]
Bug 9810: Add index notforloan for unimarc

This patch adds the notforloan index for UNIMARC (GRS-1 and DOM).

Not that the original patch does not work out of the box: the
notforloan, withdrawn and damaged indexes are not defined in the
frameworks and mapping.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 26 Marcel de Rooy 2014-08-07 11:54:46 UTC
Created attachment 30576 [details] [review]
Bug 9810: Follow-up for UNIMARC notforloan item:w consistency

To make the index defs and record.abs more consistent, adding item:w to
notforloan. Please see also damaged, withdrawn, etc.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 27 Tomás Cohen Arazi 2014-11-11 13:28:10 UTC
I'm sorry, this one is not an urgent one and needs regression tests.
After the release, I can work on them (we need to make the big tests function run on NORMARC and UNIMARC so this is testable on both).
Comment 28 Marjorie Barry-Vila 2017-10-31 17:39:59 UTC
Still valid in 16.11.

Anyone works on this?

Regards,

Marjorie
Comment 29 Margaret Hade 2019-08-27 19:12:24 UTC
Hello,
It looks like this might be solved by the patch in bug 11677. Is that the case?
Comment 30 Marjorie Barry-Vila 2020-05-27 14:31:55 UTC
(In reply to Margaret from comment #29)
> Hello,
> It looks like this might be solved by the patch in bug 11677. Is that the
> case?

Hi,

I tested it on 19.05.04 and i have same problem.

Items not for loan (authorized value <>0) are still displayed in search results.

I miss something?

Regards,

Marjorie
Comment 31 Marjorie Barry-Vila 2020-05-27 14:32:37 UTC
Created attachment 105399 [details]
available
Comment 32 Katrin Fischer 2020-05-27 20:39:30 UTC
> Hi,
> 
> I tested it on 19.05.04 and i have same problem.
> 
> Items not for loan (authorized value <>0) are still displayed in search
> results.
> 
> I miss something?
> 
> Regards,
> 
> Marjorie

I Marjorie - I believe this is not a bug for (or not false behaviour) for all libraries. Available != checked out. You might still be able to use the reference collection marked not for loan in the library.
Comment 33 Daniel Gaghan 2021-06-17 17:29:31 UTC
Our staff members mentioned this recently. When they select the Showing only available items
Comment 34 Daniel Gaghan 2021-06-17 17:41:19 UTC
Sorry network issue when posting a comment. This is what the final message should have read. 

Our staffers still consider this an issue, can we have any items with the not for loan statuses appear further down in the search results and have have available status appear first? So any material with a Not for Loan status <>0, displays after material with a Not for loan status of 0 or NULL.
Comment 35 Hannah Olsen 2024-03-26 20:09:35 UTC
This is an issue for us as well, as withdrawn items still show up in searches.