|
Description
Andrew Fuerste-Henry
2026-01-28 20:36:25 UTC
Created attachment 192137 [details] [review] Bug 41730: Add ability to update item withdrawn status when lost item paid This patch implements a new system preference, "UpdateItemWithdrawnStatusWhenPaid" that allows you to specify the withdrawn status to change an item to when the outstanding balance of a lost item is paid. This preference is tied to the WITHDRAWN authorised values set. Test Plan: - Set one the system preference to any of the available values - Set an item as lost - Make a manual invoice for your desired user and assign it to the barcode of the above item - Save and Pay - Select Pay - Pay - Note that the withdrawn status of the item has changed to the status you set with the system preference - Check that when the system preference is left blank and no option is chosen, the withdrawn status does not update. Created attachment 192138 [details] [review] Bug 41730: Unit tests Attempted signoff, and everything looks OK in a biblibre sandbox (borrowernumber=19). Test plan 100%. Unable to return (for refund) item made 'Withdrawn- item lost' as (my new) WITHDARWN status. Unsure if I should signoff as log file reported an error. Bug 41730 - Automate change Withdrawn status when item is paid for 192137 - Bug 41730: Add ability to update item withdrawn status when lost item paid 192138 - Bug 41730: Unit tests Apply? [(y)es, (n)o, (i)nteractive] Applying: Bug 41730: Add ability to update item withdrawn status when lost item paid Applying: Bug 41730: Unit tests DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_41730.pl [11:08:24]: Bug 41730 - Add UpdateItemWithdrawnStatusWhenPaid [31mERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 2 at /kohadevbox/koha/C4/Installer.pm line 825 [0m Created attachment 192252 [details] [review] Bug 41730: Correct SQL punctuation in atomicupdate Created attachment 192255 [details] [review] Bug 41730: Add ability to update item withdrawn status when lost item paid This patch implements a new system preference, "UpdateItemWithdrawnStatusWhenPaid" that allows you to specify the withdrawn status to change an item to when the outstanding balance of a lost item is paid. This preference is tied to the WITHDRAWN authorised values set. Test Plan: - Set one the system preference to any of the available values - Set an item as lost - Make a manual invoice for your desired user and assign it to the barcode of the above item - Save and Pay - Select Pay - Pay - Note that the withdrawn status of the item has changed to the status you set with the system preference - Check that when the system preference is left blank and no option is chosen, the withdrawn status does not update. Created attachment 192256 [details] [review] Bug 41730: Unit tests Created attachment 192263 [details] [review] Bug 41730: Add ability to update item withdrawn status when lost item paid This patch implements a new system preference, "UpdateItemWithdrawnStatusWhenPaid" that allows you to specify the withdrawn status to change an item to when the outstanding balance of a lost item is paid. This preference is tied to the WITHDRAWN authorised values set. Test Plan: - Set one the system preference to any of the available values - Set an item as lost - Make a manual invoice for your desired user and assign it to the barcode of the above item - Save and Pay - Select Pay - Pay - Note that the withdrawn status of the item has changed to the status you set with the system preference - Check that when the system preference is left blank and no option is chosen, the withdrawn status does not update. Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Created attachment 192264 [details] [review] Bug 41730: Unit tests Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Created attachment 192269 [details] [review] Bug 41730: Add ability to update item withdrawn status when lost item paid This patch implements a new system preference, "UpdateItemWithdrawnStatusWhenPaid" that allows you to specify the withdrawn status to change an item to when the outstanding balance of a lost item is paid. This preference is tied to the WITHDRAWN authorised values set. Test Plan: - Set one the system preference to any of the available values - Set an item as lost - Make a manual invoice for your desired user and assign it to the barcode of the above item - Save and Pay - Select Pay - Pay - Note that the withdrawn status of the item has changed to the status you set with the system preference - Check that when the system preference is left blank and no option is chosen, the withdrawn status does not update. Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Signed-off-by: Ray <raymund.delahunty@outlook.com> Created attachment 192270 [details] [review] Bug 41730: Unit tests Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Signed-off-by: Ray <raymund.delahunty@outlook.com> The test plan worked just fine, and I added a signoff, but as part of the test I did break the rule that WITHDRAWN authorised values must be numerical, when I created a new value for it. Then (as I expected) the change was not made. I’m tempted to add a new bug suggesting that the Description field in the Authorised value screen mentions the numerical requirement, while we wait for a fix to Bug 27512 - Block creation of invalid authorised values for LOST, NOTFORLOAN, DAMAGED, RESTRICTED, and WITHDRAWN. Just a thought… |