Description
Tomás Cohen Arazi (tcohen)
2021-08-26 12:33:04 UTC
Created attachment 124112 [details] [review] Bug 28906: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 124113 [details] [review] Bug 28906: Make Koha::Items->filter_by_visible_in_opac honour list context This patch makes the method honour list context. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Items.t => FAIL: Tests fail! It returns [Koha::Items]. Boo! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 124114 [details] [review] Bug 28906: (26223 follow-up) Remove use of as_list This bug makes Koha::Items->filter_by_visible_in_opac honour list context, so this explicit call is not needed. To test: 1. Pick a biblio in the OPAC 2. Go to the ISBD view => SUCCESS: It renders correctly 3. Apply this patch and restart Plack 4. Refresh the ISBD view page => SUCCESS: It doesn't break! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 124115 [details] [review] Bug 28906: (26223 follow-up) Remove use of as_list This bug makes Koha::Items->filter_by_visible_in_opac honour list context, so this explicit call is not needed. To test: 1. Pick a biblio in the OPAC 2. Go to the ISBD view => SUCCESS: It renders correctly 3. Apply this patch and restart Plack 4. Refresh the ISBD view page => SUCCESS: It doesn't break! 5. Check opac-reserve.pl doesn't break either 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 125035 [details] [review] Bug 28906: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Created attachment 125036 [details] [review] Bug 28906: Make Koha::Items->filter_by_visible_in_opac honour list context This patch makes the method honour list context. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Items.t => FAIL: Tests fail! It returns [Koha::Items]. Boo! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Created attachment 125037 [details] [review] Bug 28906: (26223 follow-up) Remove use of as_list This bug makes Koha::Items->filter_by_visible_in_opac honour list context, so this explicit call is not needed. To test: 1. Pick a biblio in the OPAC 2. Go to the ISBD view => SUCCESS: It renders correctly 3. Apply this patch and restart Plack 4. Refresh the ISBD view page => SUCCESS: It doesn't break! 5. Check opac-reserve.pl doesn't break either 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Created attachment 125258 [details] [review] Bug 28906: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 125259 [details] [review] Bug 28906: Make Koha::Items->filter_by_visible_in_opac honour list context This patch makes the method honour list context. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Items.t => FAIL: Tests fail! It returns [Koha::Items]. Boo! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 125260 [details] [review] Bug 28906: (26223 follow-up) Remove use of as_list This bug makes Koha::Items->filter_by_visible_in_opac honour list context, so this explicit call is not needed. To test: 1. Pick a biblio in the OPAC 2. Go to the ISBD view => SUCCESS: It renders correctly 3. Apply this patch and restart Plack 4. Refresh the ISBD view page => SUCCESS: It doesn't break! 5. Check opac-reserve.pl doesn't break either 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> All works as expected, no regressions found, QA scripts happy and tests all passing. Passing QA Blocked by the discussion on bug 28883. IF we decide to remove wantarray it does not make sense to have this patch. We decided to actually drop support for wantarray altogether in Koha::Objects. See bug 29844. |