For parity and more workflow options, adding the same option to the new status that updates not for loan on checkout should also have the ability to limit by item type like Bug 25560 did for check in.
Created attachment 175201 [details] [review] Bug 35292: Database changes
Created attachment 175202 [details] [review] Bug 35292: Template changes
Created attachment 175203 [details] [review] Bug 35292: Have UpdateNotForLoanStatusOnCheckOut and UpdateNotForLoanStatusOnCheckIn use the same function Both sysprefs use the same codebase. Hence the recent upgrades for UpdateNotForLoanStatusOnCheckOut were not applyied to checkout. In this patch, we refacto code in order to have them both use the same function. Test plan: Do not apply patch: 1 - Set UpdateNotForLoanStatusOnCheckin to 2: 0 2 - Set UpdateNotForLoanStatusOnCheckout to _ALL_: 0: 2 3 - Check out a book -> Its notforloan status is set to 2 4 - Check in the book -> Its notforloan status is set to 0, you get a notification 6 - APPLY PATCH 7 - Set UpdateNotForLoanStatusOnCheckin to _ALL_: 2: 0 BK: 3: 0 CR: 4: 0 8 - Set UpdateNotForLoanStatusOnCheckOut to _ALL_: 2: 0 BK: 3: 0 CR: 4: 0 8 - Check out a book -> Its notforloan status is set to 3 9 - Check in the book -> Its notforloan status is set to 0, you get a 10 - Check out a continuing resource -> Its notforloan status is set to 4 11 - Check in a continuing resource -> Its notforloan status is set to 0 11 - Check out another type of resource -> Its notforloan status is set to 2 12 - Check in the document -> Its notforloan status is set to 0 notification
Removing status needs signoff, need to update the test suite
Created attachment 175316 [details] [review] Bug 35292: Database changes
Created attachment 175317 [details] [review] Bug 35292: Template changes
Created attachment 175318 [details] [review] Bug 35292: Have UpdateNotForLoanStatusOnCheckOut and UpdateNotForLoanStatusOnCheckIn use the same function Both sysprefs use the same codebase. Hence the recent upgrades for UpdateNotForLoanStatusOnCheckOut were not applyied to checkout. In this patch, we refacto code in order to have them both use the same function. Test plan: Do not apply patch: 1 - Set UpdateNotForLoanStatusOnCheckin to 2: 0 2 - Set UpdateNotForLoanStatusOnCheckout to _ALL_: 0: 2 3 - Check out a book -> Its notforloan status is set to 2 4 - Check in the book -> Its notforloan status is set to 0, you get a notification 6 - APPLY PATCH 7 - Set UpdateNotForLoanStatusOnCheckin to _ALL_: 2: 0 BK: 3: 0 CR: 4: 0 8 - Set UpdateNotForLoanStatusOnCheckOut to _ALL_: 2: 0 BK: 3: 0 CR: 4: 0 8 - Check out a book -> Its notforloan status is set to 3 9 - Check in the book -> Its notforloan status is set to 0, you get a 10 - Check out a continuing resource -> Its notforloan status is set to 4 11 - Check in a continuing resource -> Its notforloan status is set to 0 11 - Check out another type of resource -> Its notforloan status is set to 2 12 - Check in the document -> Its notforloan status is set to 0 notification
Created attachment 175319 [details] [review] Bug 35292: Move tests of UpdateNotforloan together Note: These patches have been split for sake of understandability for review but they should probably be squashed
Created attachment 175320 [details] [review] Bug 35292: Update tests for UpdateNotForloanStatusOnCheckout Note: These patches have been split for sake of understandability for review but they should probably be squashe
Created attachment 175321 [details] [review] Bug 35292: Add tests for _updateNotForLoanFromYaml Note: These patches have been split for sake of understandability for review but they should probably be squashe
Created attachment 175322 [details] [review] Bug 35292: Move tests for UpdateNotForLoanStatusOnCheckin in a subtest Note: These patches have been split for sake of understandability for review but they should probably be squashe
Hi, I just tried this test but it quickly failed (even before applying the patch) Steps 1 to 2: ok Step 3 : ok in UNIMARC (but I had to erase the space which stands just before the 2 in UpdateNotForLoanStatusOnCheckout) but not ok in MARC21, the status is not set to 2 Step 4 : in UNIMARC, the status is not set to 0 (I didn't try in MARC21 because it failed before) is there anything I missed ?