Bug 3333 - item status for "not for loan" by item type / item is different
Summary: item status for "not for loan" by item type / item is different
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Marcel de Rooy
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks: 17643
  Show dependency treegraph
 
Reported: 2009-06-17 10:38 UTC by Katrin Fischer
Modified: 2017-06-14 22:11 UTC (History)
6 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
screenshot of items in opac (32.03 KB, image/png)
2010-06-30 14:05 UTC, Katrin Fischer
Details
screenshot of items in staff (25.76 KB, image/png)
2010-06-30 14:08 UTC, Katrin Fischer
Details
Bug 3333: Confusing item status for not-for-loans (931 bytes, patch)
2015-06-01 13:23 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 3333: Confusing item status for not-for-loans (2.76 KB, patch)
2015-06-03 13:46 UTC, Marcel de Rooy
Details | Diff | Splinter Review
[SIGNED OFF] Bug 3333: Confusing item status for not-for-loans (2.78 KB, patch)
2015-06-24 19:33 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 3333: Confusing item status for not-for-loans (2.84 KB, patch)
2015-08-20 09:08 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:09:15 UTC


---- Reported by katrin.fischer@bsz-bw.de 2009-06-17 10:38:02 ----

When item type is defined as "not for loan", items show in opac and staff with status "available".

When manually settig item on not for loan, item status is: "not for loan (<description of not for loan status from authorised value NOT_LOAN>)".

In BUG 1732 was suggested to change available to "on shelf". 

I suggest that item type and item specific "not for loan" should both be "On shelf, not for loan" or "On shelf, <NOT_LOAN value>".

Tested with 3.0.2 and HEAD.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:09 UTC  ---

This bug was previously known as _bug_ 3333 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3333
This bug depended on bug(s) 1732.

Actual time not defined. Setting to 0.0

Comment 1 Katrin Fischer 2010-06-30 14:05:50 UTC
Created attachment 2290 [details]
screenshot of items in opac

I retested this bug today on current HEAD (Koha Version: 3.01.00.141)

I think the status display in OPAC works fine now, but I see a difference to the status shown in staff. In staff items, which item type is not for loan, still show as available, in OPAC as not for loan. (see screenshots)
Comment 2 Katrin Fischer 2010-06-30 14:08:43 UTC
Created attachment 2291 [details]
screenshot of items in staff

The item display is a bit broken, because the item is part of a series. I will file a separate bug for that.

XSLT on/off has no effect on the item display.
Comment 3 Owen Leonard 2010-06-30 16:05:56 UTC
It looks like the current exception is:

- Staff client display
- The item's item type is designated as not for loan
- The item record itself has no not-for-loan status set

In this case the item appears as "Available."
Comment 4 Marcel de Rooy 2015-06-01 13:23:03 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2015-06-01 13:28:41 UTC
Just a note... this was the very first bug I filed :)
Comment 6 Marcel de Rooy 2015-06-03 13:46:33 UTC Comment hidden (obsolete)
Comment 7 David Cook 2015-06-16 01:09:31 UTC
(In reply to Owen Leonard from comment #3)
> It looks like the current exception is:
> 
> - Staff client display
> - The item's item type is designated as not for loan
> - The item record itself has no not-for-loan status set
> 
> In this case the item appears as "Available."

I think that Owen's comment here is still relevant as well - at least as of 3.14.5. 

I don't know if I should splinter that off into its own bug or attach another patch as well to bring the staff client into line with the OPAC?
Comment 8 David Cook 2015-06-16 01:19:23 UTC
It might be worthwhile to make a new bug or re-think how we're showing "notforloan" across the board...

At the moment, the OPAC detail view relies on "notforloan_per_itemtype" which is set in C4::Items::GetItemsInfo() by checking itemtypes.notforloan directly. That should probably take "item-level_itypes" into account, I guess.

So I would add "notforloan_per_itemtype" to the staff client, and set that based on "item-level_itypes". 

Then make sure that the search results are honouring that as well...
Comment 9 Marcel de Rooy 2015-06-22 08:16:50 UTC
(In reply to David Cook from comment #7)
> (In reply to Owen Leonard from comment #3)
> > It looks like the current exception is:
> > 
> > - Staff client display
> > - The item's item type is designated as not for loan
> > - The item record itself has no not-for-loan status set
> > 
> > In this case the item appears as "Available."
> 
> I think that Owen's comment here is still relevant as well - at least as of
> 3.14.5. 
> 
> I don't know if I should splinter that off into its own bug or attach
> another patch as well to bring the staff client into line with the OPAC?

I saw that too. I had to add a small adjustment to catalogue/detail.tt in 3.14.X too. But it is not needed in master any more. So I do not include it here.
Comment 10 Marcel de Rooy 2015-06-22 08:20:46 UTC
(In reply to David Cook from comment #8)
> It might be worthwhile to make a new bug or re-think how we're showing
> "notforloan" across the board...
> 
> At the moment, the OPAC detail view relies on "notforloan_per_itemtype"
> which is set in C4::Items::GetItemsInfo() by checking itemtypes.notforloan
> directly. That should probably take "item-level_itypes" into account, I
> guess.
> 
> So I would add "notforloan_per_itemtype" to the staff client, and set that
> based on "item-level_itypes". 
> 
> Then make sure that the search results are honouring that as well...

See detail.tt line 685. It takes into account now the nfl_per_itemtype.

Rewriting things is fine but will take time, but in the meantime I propose to use this solution to resolve this annoying bug.

Who adds a signoff ?
Comment 11 Nick Clemens 2015-06-24 19:33:01 UTC Comment hidden (obsolete)
Comment 12 Nick Clemens 2015-06-24 19:38:35 UTC
> Additionally, a Place hold link should disappear in the opac, when it is
> not possible to place a hold on any item of one biblio.

Everything got marked 'Not for loan' as expected, but I didn't see the above triggered

'Item available for reference' statement in OPAC search results also seems a big presumption for a not for loan item type, but that is pre-existing / not your problem
Comment 13 Jonathan Druart 2015-08-19 13:04:50 UTC
(In reply to Nick Clemens from comment #12)
> > Additionally, a Place hold link should disappear in the opac, when it is
> > not possible to place a hold on any item of one biblio.
> 
> Everything got marked 'Not for loan' as expected, but I didn't see the above
> triggered
> 
> 'Item available for reference' statement in OPAC search results also seems a
> big presumption for a not for loan item type, but that is pre-existing / not
> your problem

Marcel, is it still valid? Should we remove from the test plan or it's a bug?
Comment 14 Marcel de Rooy 2015-08-19 13:28:43 UTC
(In reply to Jonathan Druart from comment #13)
> (In reply to Nick Clemens from comment #12)
> > > Additionally, a Place hold link should disappear in the opac, when it is
> > > not possible to place a hold on any item of one biblio.
> > 
> > Everything got marked 'Not for loan' as expected, but I didn't see the above
> > triggered
> > 
> > 'Item available for reference' statement in OPAC search results also seems a
> > big presumption for a not for loan item type, but that is pre-existing / not
> > your problem
> 
> Marcel, is it still valid? Should we remove from the test plan or it's a bug?

I think so, but will verify.
Comment 15 Marcel de Rooy 2015-08-19 14:49:04 UTC
(In reply to Jonathan Druart from comment #13)
> (In reply to Nick Clemens from comment #12)
> > > Additionally, a Place hold link should disappear in the opac, when it is
> > > not possible to place a hold on any item of one biblio.
> > 
> > Everything got marked 'Not for loan' as expected, but I didn't see the above
> > triggered
> > 
> Marcel, is it still valid? Should we remove from the test plan or it's a bug?

The Place hold link disappears for a biblio with (all) items marked not for loan via the special itemtype.
But here is the misunderstanding: The test plan does not include this specific case mentioned in the commit message. (Since the second biblio in the test plan only has one item of the itemtype with NFL.)
So no bug, no actual change of test plan needed.
Could have been an additional test in the test plan.. And it works for me :)
Comment 16 Jonathan Druart 2015-08-19 16:28:40 UTC
Using an existing record, I get 1 item "available for loan" and 1 "available for reference".
The one "available for reference" is the one with an item type not for loan.

The display is the same before and after the patch.
I don't manage to know why it has this status.
Comment 17 Marcel de Rooy 2015-08-20 07:12:54 UTC
(In reply to Jonathan Druart from comment #16)
> Using an existing record, I get 1 item "available for loan" and 1 "available
> for reference".
> The one "available for reference" is the one with an item type not for loan.
> 
> The display is the same before and after the patch.
> I don't manage to know why it has this status.

Without the patch
===
staff catalogue results: 2 items, 2 available
opac xslt results: 1 for loan, 1 for reference
opac non-xslt results: Available: branch(1), branch(1)

With the patch:
===
staff catalogue results: 2 items, 1 available
opac xslt results: 1 for loan, 1 for reference
opac non-xslt results: Available: branch(1)

So, your test confirms my opac xslt results. But note the results in opac non-xslt and staff catalogue. See commit message.
Comment 18 Marcel de Rooy 2015-08-20 07:25:40 UTC
Joubu:  $status = "reference";   see XSLT.pm sub  buildKohaItemsNamespace   (why did I forget that :)
Comment 19 Jonathan Druart 2015-08-20 09:08:08 UTC
Created attachment 41704 [details] [review]
Bug 3333: Confusing item status for not-for-loans

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 20 Tomás Cohen Arazi 2015-08-20 16:48:08 UTC
Patch pushed to master.

Thanks Marcel!