Bug 27843 - Editing item's Collection code sets items.cn_sort to NULL
Summary: Editing item's Collection code sets items.cn_sort to NULL
Status: RESOLVED DUPLICATE of bug 27509
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: 20.11
Hardware: Other Linux
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-02 20:36 UTC by Paul Milazzo
Modified: 2021-03-11 13:16 UTC (History)
3 users (show)

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


Attachments
Current Server Information (1.28 KB, text/plain)
2021-03-02 20:36 UTC, Paul Milazzo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Milazzo 2021-03-02 20:36:00 UTC
Created attachment 117551 [details]
Current Server Information

Moving a single item to a different collection---by editing the item in the Staff Interface and selecting a different value in the Collection code menu---has the side effect of setting the items.cn_sort field for that item to NULL. As a result, the item disappears from the OPAC shelf browser, and initiating shelf browsing from that item fails. For example, moving Item 681 from ART to NFIC:

Before:
+------------+-------+--------------------+-----------------------+
| itemnumber | ccode | itemcallnumber     | cn_sort               |
+------------+-------+--------------------+-----------------------+
|        681 | ART   | ND553.R45 A4 2010a | ND0553 R45 A4  02010A |
+------------+-------+--------------------+-----------------------+

After:
+------------+-------+--------------------+---------+
| itemnumber | ccode | itemcallnumber     | cn_sort |
+------------+-------+--------------------+---------+
|        681 | NFIC  | ND553.R45 A4 2010a | NULL    |
+------------+-------+--------------------+---------+

After manually restoring the content of the items.cn_sort field, the item reappears in the shelf browser in the destination collection.

I'm running Koha 20.11 on a Raspberry Pi 4B (it's my personal library). I have ShelfBrowserUsesCcode turned on and use LoC Classification for call numbers. I have attached my current Server Information.
Comment 1 Jonathan Druart 2021-03-11 07:52:16 UTC
Hi Paul,
Which exact version of Koha are you using?
It seems that it's fixed by bug 27509 (that is in 21.05.00, 20.11.02 and 20.05.08)
Comment 2 Myka Kennedy Stephens 2021-03-11 12:45:17 UTC
I can confirm that this is fixed by the patch for bug 27509 on 20.05.08.
Comment 3 Jonathan Druart 2021-03-11 13:16:13 UTC

*** This bug has been marked as a duplicate of bug 27509 ***