Some bugs pushed later, and some misses, made bug 36495 incomplete. I filed bug 37672 when dealing with record sources, but there are more.
Created attachment 170498 [details] [review] Bug 37686: Fix render_resource_not_found() and render_resource_deleted() misses This patch refactors some small pieces of code to use the helpers as prescribed on our coding guidelines [1] instead of manually crafting responses. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/ => SUCCESS: All tests pass 3. Sign off :-D [1] https://wiki.koha-community.org/wiki/Coding_Guidelines_-_API#REST4:_Controller_code_.5BDRAFT.5D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 170541 [details] [review] Bug 37686: Fix render_resource_not_found() and render_resource_deleted() misses This patch refactors some small pieces of code to use the helpers as prescribed on our coding guidelines [1] instead of manually crafting responses. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/ => SUCCESS: All tests pass 3. Sign off :-D [1] https://wiki.koha-community.org/wiki/Coding_Guidelines_-_API#REST4:_Controller_code_.5BDRAFT.5D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 170553 [details] [review] Bug 37686: Fix render_resource_not_found() and render_resource_deleted() misses This patch refactors some small pieces of code to use the helpers as prescribed on our coding guidelines [1] instead of manually crafting responses. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/ => SUCCESS: All tests pass 3. Sign off :-D [1] https://wiki.koha-community.org/wiki/Coding_Guidelines_-_API#REST4:_Controller_code_.5BDRAFT.5D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
What is it missing? (please update bug description :) )
I really wish you all would stop sneaking Biblio back in: https://wiki.koha-community.org/wiki/Terminology#B git grep "Biblio not found" Koha/REST/V1/Holds.pm: openapi => "Biblio not found." api/v1/swagger/paths/biblios.yaml: description: Biblio not found api/v1/swagger/paths/biblios.yaml: description: Biblio not found api/v1/swagger/paths/biblios.yaml: description: Biblio not found api/v1/swagger/paths/biblios.yaml: description: Biblio not found api/v1/swagger/paths/biblios.yaml: description: Biblio not found api/v1/swagger/paths/biblios.yaml: description: Biblio not found api/v1/swagger/paths/biblios.yaml: description: Biblio not found api/v1/swagger/paths/biblios.yaml: description: Biblio not found api/v1/swagger/paths/biblios.yaml: description: Biblio not found api/v1/swagger/paths/biblios.yaml: description: Biblio not found api/v1/swagger/paths/biblios.yaml: description: Biblio not found api/v1/swagger/paths/biblios_merge.yaml: description: Biblio not found api/v1/swagger/paths/deleted_biblios.yaml: description: Biblio not found api/v1/swagger/paths/deleted_biblios.yaml: description: Biblio not found api/v1/swagger/paths/holds.yaml: description: Biblio not found api/v1/swagger/paths/items.yaml: description: Biblio not found misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl: $debug and warn '[ERROR] Biblio not found.'; misc/maintenance/process_record_through_filter.pl: print "Biblio not found\n"; t/db_dependent/api/v1/deleted_biblios.t: ->json_is( '/error', 'Biblio not found' );
Pushed for 24.11! Well done everyone, thank you!
(In reply to Katrin Fischer from comment #5) > I really wish you all would stop sneaking Biblio back in: > https://wiki.koha-community.org/wiki/Terminology#B > > git grep "Biblio not found" Maybe that query is too broad heh. Happy to provide a follow-up tomorrow morning.
You only added one of these, I pondered fixing it.. then got discouraged by the number of occurences.
Actually you would need to fix: + return $c->render_resource_not_found("Biblio");
(In reply to Katrin Fischer from comment #9) > Actually you would need to fix: > + return $c->render_resource_not_found("Biblio"); I've actually filed bug 37791.