Repository navigation
Bug 2081849 - Migrate Bug REST resource to native Mojo API: field metadata (fields, legal_values, flag_types) - #2785
Merged
Merged
Conversation
…adata (fields, legal_values, flag_types)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports
fields,legal_valuesandflag_typesfromBugzilla::WebService::Buginto a nativeBugzilla::API::V1::BugFieldMojo controller, following the earlier migrations in this series.First of the four sub-bugs of 2081819. The rest of the legacy Bug module stays until 2081860.
Changes
Bugzilla/API/V1/BugField.pm, with the same responses as the legacy endpoints:GET /rest/field/bug[/<id_or_name>]GET /rest/field/bug/<field>[/<product_id>]/valuesGET /rest/flag_types/<product>[/<component>]OPTIONSon each of themBugzilla/WebService/Bug.pm, and their routes fromResources/Bug.pm.ids/namesproduct_idandcomponentcan come from the query string, the path winsqa/t/rest_flag_types.t(this endpoint had no test)rest_field.tandrest_bug_legal_values.tcover the query parameter handlingNot carried over: ETag/304 and JSONP
callback=, as in the other migrated V1 modules.Test plan
GET /rest/field/bug,/rest/field/bug/<id>,/rest/field/bug/<name>GET /rest/field/bug/bug_status?names=priority, expecting both fieldsGET /rest/field/bug/priority?include_fields=id,nameGET /rest/field/bug/priority/valuesGET /rest/field/bug/version/<product_id>/valuesand/rest/field/bug/version/values?product_id=<id>GET /rest/field/bug/version/valueswithout a product, expectingparam_requiredGET /rest/field/bug/version/<private product_id>/valueslogged out, expectingproduct_access_deniedGET /rest/flag_types/<product>and/rest/flag_types/<product>/<component>, logged out and as adminOPTIONS /rest/flag_types/<product>returnsAllow: GETReferences