Open Bug 2081860 Opened 6 days ago Updated 6 days ago

Migrate Bug REST resource to native Mojo API: bug objects (get, search, create, update, possible_duplicates, history)

Categories

(bugzilla.mozilla.org :: API, task)

Production

Tracking

()

UNCONFIRMED

People

(Reporter: xavier.lhour, Unassigned)

References

(Depends on 2 open bugs, Blocks 1 open bug)

Details

Part of bug 2081819

Port the bug object endpoints of the legacy Bug REST resource to a native Mojo controller, Bugzilla::API::V1::Bug.

Endpoints:

  • GET /rest/bug
  • POST /rest/bug
  • GET /rest/bug/<id_or_alias>
  • PUT /rest/bug/<id_or_alias>
  • GET /rest/bug/possible_duplicates
  • GET /rest/bug/<id_or_alias>/history

Scope:

  • Port the six methods (get, search, create, update, possible_duplicates, history), keeping request parameters and response format unchanged.
  • Keep the webservice_bug_get hook working (used by JiraWebhookSync).
  • They are called by the web UI (BugModal CC and flag changes, guided bug entry, duplicate search on bug entry and instant search), so the native endpoints must match those calls exactly.
  • /rest/bug/<id_or_alias> must not capture /rest/bug/possible_duplicates, /rest/bug/comment/... or /rest/bug/attachment/....

Final cleanup (last of the Bug sub-tasks):

  • Delete Bugzilla::WebService::Bug and Bugzilla::WebService::Server::REST::Resources::Bug. This includes update_see_also, which has no REST route and has been unreachable since the JSON-RPC/XML-RPC removal.
  • Remove the Bug entries from WS_DISPATCH (Bugzilla/WebService/Constants.pm), Bugzilla/WebService/Server/REST.pm and the POD of Bugzilla/WebService.pm.
  • extensions/MyDashboard/lib/WebService.pm inherits from Bugzilla::WebService::Bug and calls its comments(), so it must stop depending on it first.
Blocks: 2081819
Depends on: 2081849, 2081856, 2081859
You need to log in before you can comment on or make changes to this bug.