---- 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
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)
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.
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."
Created attachment 39742 [details] [review] Bug 3333: Confusing item status for not-for-loans A first try. Please hang on..
Just a note... this was the very first bug I filed :)
Created attachment 39807 [details] [review] Bug 3333: Confusing item status for not-for-loans This patch makes a tiny change in C4::Search::searchResults as to the handling of not-for-loans. This should make the display of status and availability of items more consistent in opac and staff. 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. The following spots need special attention; the display should be corrected by this patch: [A] Location column showing number of available items in catalogue/search. [B] Location column of Cataloging Search (addbooks.pl) [C] OPAC Search results list in non-XSLT view. NOTE The forms opac-MARCdetail and MARCdetail also include an Items table with column Not for loan. The information in this column might still be somewhat confusing but is actually correct. The column only contains Not for loan if the item field is set. So it is empty when only the item type is nfl. Since a correction here is arguable, I am not including it on this report. Test plan: [1] Have at least two item types. Mark one item type (X) as not for loan. [2] Use at least two biblios with two items each. Mark one item of the first biblio as not for loan at item level (via item editor). Change one item of the second biblio to the item type of step 1 (X). [3] Set pref item-level_itypes==item and set all four xslt prefs (for opac and staff, results and detail) to default. [4] Check spots A, B and C as mentioned above. Also check: [D] OPAC Detail, Holdings table, Status column [E] Staff Detail, Holdings, Status. [5] Make all four xslt prefs now empty. Check spots A to E again. Especially observe C here. [6] Set pref item-level_itypes==biblio. Change your second biblio to item type of step 1 (X) in the cataloguing editor (MARC 942c). Check spots A to E again. [7] Set all four xslt prefs again to default. Check spots A to E again. [8] Run the unit test t/db_dependent/Search.t.
(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?
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...
(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.
(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 ?
Created attachment 40599 [details] [review] [SIGNED OFF] Bug 3333: Confusing item status for not-for-loans This patch makes a tiny change in C4::Search::searchResults as to the handling of not-for-loans. This should make the display of status and availability of items more consistent in opac and staff. 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. The following spots need special attention; the display should be corrected by this patch: [A] Location column showing number of available items in catalogue/search. [B] Location column of Cataloging Search (addbooks.pl) [C] OPAC Search results list in non-XSLT view. NOTE The forms opac-MARCdetail and MARCdetail also include an Items table with column Not for loan. The information in this column might still be somewhat confusing but is actually correct. The column only contains Not for loan if the item field is set. So it is empty when only the item type is nfl. Since a correction here is arguable, I am not including it on this report. Test plan: [1] Have at least two item types. Mark one item type (X) as not for loan. [2] Use at least two biblios with two items each. Mark one item of the first biblio as not for loan at item level (via item editor). Change one item of the second biblio to the item type of step 1 (X). [3] Set pref item-level_itypes==item and set all four xslt prefs (for opac and staff, results and detail) to default. [4] Check spots A, B and C as mentioned above. Also check: [D] OPAC Detail, Holdings table, Status column [E] Staff Detail, Holdings, Status. [5] Make all four xslt prefs now empty. Check spots A to E again. Especially observe C here. [6] Set pref item-level_itypes==biblio. Change your second biblio to item type of step 1 (X) in the cataloguing editor (MARC 942c). Check spots A to E again. [7] Set all four xslt prefs again to default. Check spots A to E again. [8] Run the unit test t/db_dependent/Search.t. Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
> 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
(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?
(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.
(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 :)
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.
(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.
Joubu: $status = "reference"; see XSLT.pm sub buildKohaItemsNamespace (why did I forget that :)
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>
Patch pushed to master. Thanks Marcel!