Description
Tomás Cohen Arazi (tcohen)
2023-05-16 18:08:08 UTC
100% agree here. Created attachment 152135 [details] [review] Bug 33749: Add TrimFields field class This patch adds a RecordProcessor filter class that takes care of performing the field cleanup that was originally done in the static method `Koha::MetadataRecord::stripWhitespaceChars`. In order to test the results, I adapted the tests to use the filter instead of the original method. To test: 1. Run: $ ktd --shell k$ prove t/Koha_MetadataRecord.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests still pass 4. Sign off :-D Created attachment 152136 [details] [review] Bug 33749: Use TrimFields instead of stripWhitespaceChars This patch replaces the uses of the static method with the new filter. It also moves the tests to the relevant place and removes the (now) unused method. Can we get a review from the original authors? Created attachment 156442 [details] [review] Bug 33749: Add TrimFields field class This patch adds a RecordProcessor filter class that takes care of performing the field cleanup that was originally done in the static method `Koha::MetadataRecord::stripWhitespaceChars`. In order to test the results, I adapted the tests to use the filter instead of the original method. To test: 1. Run: $ ktd --shell k$ prove t/Koha_MetadataRecord.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests still pass 4. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Created attachment 156443 [details] [review] Bug 33749: Use TrimFields instead of stripWhitespaceChars This patch replaces the uses of the static method with the new filter. It also moves the tests to the relevant place and removes the (now) unused method. Signed-off-by: David Nind <david@davidnind.com> Created attachment 158338 [details] [review] Bug 33749: Add TrimFields field class This patch adds a RecordProcessor filter class that takes care of performing the field cleanup that was originally done in the static method `Koha::MetadataRecord::stripWhitespaceChars`. In order to test the results, I adapted the tests to use the filter instead of the original method. To test: 1. Run: $ ktd --shell k$ prove t/Koha_MetadataRecord.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests still pass 4. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 158339 [details] [review] Bug 33749: Add TrimFields field class This patch adds a RecordProcessor filter class that takes care of performing the field cleanup that was originally done in the static method `Koha::MetadataRecord::stripWhitespaceChars`. In order to test the results, I adapted the tests to use the filter instead of the original method. To test: 1. Run: $ ktd --shell k$ prove t/Koha_MetadataRecord.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests still pass 4. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 158340 [details] [review] Bug 33749: Use TrimFields instead of stripWhitespaceChars This patch replaces the uses of the static method with the new filter. It also moves the tests to the relevant place and removes the (now) unused method. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 158341 [details] [review] Bug 33749: (QA follow-up) Tidy code for qa script Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master for 23.11. Nice work everyone, thanks! Enhancement not pushed to 23.05.x |