Bug 21264

Summary: Data inconsistencies - "Item type" and "item type for older issues" in subscriptions
Product: Koha Reporter: Victor Grousset/tuxayo <victor>
Component: Command-line UtilitiesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: robin
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 20461    
Bug Blocks: 21010    

Description Victor Grousset/tuxayo 2018-08-23 15:12:50 UTC
We should test for remains of bug 20461.
Which will cause that more items (serial issues) will be created with an itype to NULL

See the following for more details about the issue
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461#c13
Comment 1 Katrin Fischer 2018-10-28 18:37:44 UTC
Isn't this covered by bug 21591 / bug 21150 ?
Comment 2 Victor Grousset/tuxayo 2019-01-21 16:38:58 UTC
This issue is one of the causes of having invalid itype on items.
So it would help having directly the root cause.

We use a check for that:
https://git.biblibre.com/biblibre/tools/src/commit/da516fdcd8a367047e1a5e5bdff9f9449f45b6eb/koha/db_check_itype.sh#L34

The important par is this one:

if [[ "$itype_on_item" ]] &&                 # the syspref
   [[ "$makePreviousSerialAvailable" ]] &&   # another syspref
   [[ "$invalid_itemtypes_exists" ||         # subscription.itemtype 
      "$invalid_previousitemtypes_exists" ]] # subscription.previousitemtype
Comment 3 Victor Grousset/tuxayo 2019-01-21 17:00:24 UTC
Maybe checking for subscription.itemtype isn't need. I haven't tested if the MARC frameworks usually doesn't let invalid values slip by.