Created attachment 149236 [details] [review] Bug 33431: Make C4::Circulation use C4::Context->yaml_preference This patch removes manual YAML handling for sysprefs in C4::Circulation. It also makes C4::Context->yaml_preference not warn when undef is retrieved from the sysprefs. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Circulation* => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D
Created attachment 149237 [details] [review] Bug 33431: Make C4::Record use C4::Context->yaml_preference This patch makes what the title says. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Rec* => SUCCESS: Tests pass 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 149238 [details] [review] Bug 33431: Fix remaining cases This patch tweaks three remaining cases, that are not covered by tests. To test: 1. Apply this patch 2. Make use of those places => SUCCESS: No behavior change
The tests for the first two patches pass, both before and after the patches are applied. I'm not sure for the third patch what features/things to test to make sure they work as expected.
Created attachment 160245 [details] [review] Bug 33431: Make C4::Circulation use C4::Context->yaml_preference This patch removes manual YAML handling for sysprefs in C4::Circulation. It also makes C4::Context->yaml_preference not warn when undef is retrieved from the sysprefs. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Circulation* => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D
Created attachment 160246 [details] [review] Bug 33431: Make C4::Record use C4::Context->yaml_preference This patch makes what the title says. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Rec* => SUCCESS: Tests pass 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 160247 [details] [review] Bug 33431: Fix remaining cases This patch tweaks three remaining cases, that are not covered by tests. To test: 1. Apply this patch 2. Make use of those places => SUCCESS: No behavior change
(In reply to David Nind from comment #4) > The tests for the first two patches pass, both before and after the patches > are applied. > > I'm not sure for the third patch what features/things to test to make sure > they work as expected. Hi, this changes are pretty trivial code-wise. For the third patch you would need to: * Have something set on `RisExportAdditionalFields` and export a record as RIS- It should still work as usual. * Have something set on `MarcFieldsToOrder` and add an order using an ISO2709 (mrc) file. Should work as usual * Have something set for `UpdateItemWhenLostFromHoldList` and a couple pending holds. I'm not sure how to trigger it but it seems to be possible to mark a hold as lost from the pending list, and it should honor the setting.
Created attachment 160281 [details] [review] Bug 33431: Make C4::Circulation use C4::Context->yaml_preference This patch removes manual YAML handling for sysprefs in C4::Circulation. It also makes C4::Context->yaml_preference not warn when undef is retrieved from the sysprefs. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Circulation* => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: David Nind <david@davidnind.com>
Created attachment 160282 [details] [review] Bug 33431: Make C4::Record use C4::Context->yaml_preference This patch makes what the title says. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Rec* => SUCCESS: Tests pass 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 160283 [details] [review] Bug 33431: Fix remaining cases This patch tweaks three remaining cases, that are not covered by tests. To test: 1. Apply this patch 2. Make use of those places => SUCCESS: No behavior change Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD) - for patch 3 (see comment #8): 1. Add LC: 010$a to RisExportAdditionalFields and export a record as RIS. It should still work as usual and be the same before and after the patch. I used record 262 (Perl programming). 2. Have something set on `MarcFieldsToOrder` and add an order using an ISO2709 (mrc) file. Should work as usual. 2.1 I used the steps from comment 22 and sample files for bug 34645 3. Have something set for `UpdateItemWhenLostFromHoldList` and a couple pending holds. See this ByWater Solutions tutorial "Alert Patrons When Hold is Cancelled" https://bywatersolutions.com/education/monday-minutes-alert-patrons-when-hold-is-cancelled
Created attachment 160392 [details] [review] Bug 33431: Make C4::Circulation use C4::Context->yaml_preference This patch removes manual YAML handling for sysprefs in C4::Circulation. It also makes C4::Context->yaml_preference not warn when undef is retrieved from the sysprefs. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Circulation* => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Created attachment 160393 [details] [review] Bug 33431: Make C4::Record use C4::Context->yaml_preference This patch makes what the title says. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Rec* => SUCCESS: Tests pass 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Created attachment 160394 [details] [review] Bug 33431: Fix remaining cases This patch tweaks three remaining cases, that are not covered by tests. To test: 1. Apply this patch 2. Make use of those places => SUCCESS: No behavior change Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
I am sorry, this no longer applies. I'll put it on my list to check and push with higher priority: Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 33431: Make C4::Circulation use C4::Context->yaml_preference Using index info to reconstruct a base tree... M C4/Circulation.pm Falling back to patching base and 3-way merge... Auto-merging C4/Circulation.pm CONFLICT (content): Merge conflict in C4/Circulation.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 33431: Make C4::Circulation use C4::Context->yaml_preference hint: Use 'git am --show-current-patch=diff' to see the failed patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-33431-Make-C4Circulation-use-C4Context-yamlpre-issx6rg8.patch
(In reply to Katrin Fischer from comment #16) > I am sorry, this no longer applies. I'll put it on my list to check and push > with higher priority: Caused by bug 35293.
Created attachment 162381 [details] [review] Bug 33431: Make C4::Circulation use C4::Context->yaml_preference This patch removes manual YAML handling for sysprefs in C4::Circulation. It also makes C4::Context->yaml_preference not warn when undef is retrieved from the sysprefs. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Circulation* => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Created attachment 162382 [details] [review] Bug 33431: Make C4::Record use C4::Context->yaml_preference This patch makes what the title says. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Rec* => SUCCESS: Tests pass 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Created attachment 162384 [details] [review] Bug 33431: Fix remaining cases This patch tweaks three remaining cases, that are not covered by tests. To test: 1. Apply this patch 2. Make use of those places => SUCCESS: No behavior change Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Nice code clean-up!
Pushed for 24.05! Well done everyone, thank you!
Enhancement not pushed to 23.11.x