Bug 30051

Summary: Changing AcqCreateItems value impacts baskets set to follow default behavior
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: AcquisitionsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
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:

Description Andrew Fuerste-Henry 2022-02-08 19:08:02 UTC
When creating a basket in acquisitions, we record the user's choice for item creation in aqbasket.create_items. However, if one sets the basket to follow the default behavior determined in the AcqCreateItems syspref then we leave aqbasket.create_items NULL.

This can create issues if the syspref gets changed. For example:
- set AcqCreateItems to "placing an order"
- create a basket, leaving item creation set to the default
- confirm aqbasket.create_items is null
- add an order to your basket from a new bib. confirm your bib and 1 item are created.
- close your basket
- set AcqCreateItems to "receiving an order"
- receive your order
- confirm receiving the order creates a second item
Comment 1 Katrin Fischer 2022-02-21 22:44:00 UTC
I believe you are right, leaving NULL for 'default' does not make sense here as you would not want a later change to affect already added orders.

So we should probably add the 'right' value to create_items when adding it and for the existing orders add it from the current AcqCreateItem setting?

We might also want to get rid of the 'fourth' option in the pull down as that is a little confusing. We could just add a note to the option matching the pref and preselect it. What do you think?