Bug 15347

Summary: itemcallnumber syspref does not work when adding items through acquisitions
Product: Koha Reporter: Jesse Weaver <jweaver>
Component: AcquisitionsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: karen, katrin.fischer, kfitz, marjorie.barry-vila, michaela.sieber
Version: Main   
Hardware: PC   
OS: Windows   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Jesse Weaver 2015-12-10 00:34:19 UTC
When adding items at the time of receiving, the itemcallnumber field is not filled in per the itemcallnumber syspref as it is when creating items normally.
Comment 1 Karen 2017-08-14 19:26:19 UTC
We just discovered that when adding items through the Z39.50 search in the Acquisitions module, the item's call number does not display in the catalog unless you edit the item. Once you edit the item and save it, the call number will display. We tested this on 16.11 and 17.05 and had the same results.

The expected behavior is that the call number would automatically display in the catalog without the need to edit the item first.
Comment 2 Katrin Fischer 2017-08-15 13:49:51 UTC
Karen, are you using AcqCreateItem = on receive?
Comment 3 Karen 2017-08-15 16:36:31 UTC
Hi Katrin - I'm using AcqCreateItem = placing an order.
Comment 4 Katrin Fischer 2017-08-15 17:47:52 UTC
Hi Karen, is the itemcallnumber visible when you save the item in acquisitions? It not showing is a sign that it's actually not added to the item. When you open it in cataloguing and it shows up there, I think it's coming from the bibliographic record at that moment, but not saved yet. Does that make sense? It's still a bug of course.
Comment 5 Karen 2017-08-15 18:45:11 UTC
Hi Katrin - I understand what you're saying. Yes, the itemcallnumber is visible in the item record when I save the item in acquisitions, but it will only appear in the catalog after I edit the item record and save it.
Comment 6 Katrin Fischer 2017-08-15 18:47:09 UTC
Hm, that's interesting, I will try to test!
Comment 7 Katrin Fischer 2017-08-17 13:38:51 UTC
I can confirm that the itemcallnumber system preference doesn't work for adding items from acquisition.

To test:
- Make sure itemcallnumber preference is set to field and subfield, that exists
  in the records you want to use for testing.
- Verify that preference works in general in your installation:
  - Add new item for an existing record with the field.
  - Verify that the callnumber is filled with the value from the
    bibliographic record as a suggestion.
- Set AcqCreateItem to 'on order'
  - Create a new basket
  - Add a order line to it
  - Verify that the callnumber remains empty unlike in cataloging.
Set AcqCreateItem to 'on receive'
  - Create a new basket
  - Add a order line to it
  - Close basket
  - Receive shipment
  - Verify that callnumber remains empty unlike in cataloging.

If I enter a callnumber to the item in one of those steps, it's stored correctly and visible in the catalog immediately after saving.

I think it doesn't matter if it's from Z39.50 or from an existing records - it never works.
Comment 8 Kate Fitz 2023-03-08 19:34:42 UTC
We have recently experienced this issue when importing MARC records from an outside vendor. After import, the Call Number is in the record, but does not display on items on either the staff catalog or public catalog until the record has been opened, saved, and closed.
Comment 9 Katrin Fischer 2023-04-23 15:51:44 UTC
(In reply to Kate Fitz from comment #8)
> We have recently experienced this issue when importing MARC records from an
> outside vendor. After import, the Call Number is in the record, but does not
> display on items on either the staff catalog or public catalog until the
> record has been opened, saved, and closed.

That's the correct behaviour. You imported with the callnumber in the record and it won't be added to the items automatically. Because you have set itemcallnumber system preference it will suggest the callnumber from the record when you edit an item with an empty callnumber field. Now when you save hte callnumber is actually added to the item.
You might want to shift the callnumber into the items (952$o) before importing.
Comment 10 Katrin Fischer 2023-04-23 15:54:31 UTC
(In reply to Katrin Fischer from comment #7)
> I can confirm that the itemcallnumber system preference doesn't work for
> adding items from acquisition.
> 
> To test:
> - Make sure itemcallnumber preference is set to field and subfield, that
> exists
>   in the records you want to use for testing.
> - Verify that preference works in general in your installation:
>   - Add new item for an existing record with the field.
>   - Verify that the callnumber is filled with the value from the
>     bibliographic record as a suggestion.
> - Set AcqCreateItem to 'on order'
>   - Create a new basket
>   - Add a order line to it
>   - Verify that the callnumber remains empty unlike in cataloging.
> Set AcqCreateItem to 'on receive'
>   - Create a new basket
>   - Add a order line to it
>   - Close basket
>   - Receive shipment
>   - Verify that callnumber remains empty unlike in cataloging.
> 
> If I enter a callnumber to the item in one of those steps, it's stored
> correctly and visible in the catalog immediately after saving.
> 
> I think it doesn't matter if it's from Z39.50 or from an existing records -
> it never works.

Can confirm this is still an issue in current master.