Defect #29055

Searching for issue number with REST API redirects to issue HTML page

Added by Igor Antonov about 1 year ago. Updated 4 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:REST API
Target version:3.4.10
Resolution:Fixed Affected version:3.3.0

Description

Search REST API queries matching issue number (with or without "#") are being redirected to HTML issue page if the issue exists.
The redirect is caused by quick jump to issue at source:/tags/3.3.0/app/controllers/search_controller.rb#L40.

Quick jump is useful for search field in the UI but REST API response with redirect to an HTML page is... unexpected.
I suggest leaving quick jump for HTML response and actually searching for issue number-like text for REST API.

fix-29055.patch Magnifier (1.13 KB) Go MAEDA, 2019-03-02 07:35

Associated revisions

Revision 17949
Added by Jean-Philippe Lang 4 months ago

Searching for issue number with REST API redirects to issue HTML page (#29055).

Patch by Go MAEDA.

Revision 17950
Added by Jean-Philippe Lang 4 months ago

Merged r17949 to 4.0-stable (#29055).

Revision 17951
Added by Jean-Philippe Lang 4 months ago

Merged r17949 to 3.4-stable (#29055).

History

#1 Updated by Go MAEDA 5 months ago

  • File fix-29055.patchMagnifier added
  • Target version set to Candidate for next minor release

Probably the redirecting is nouse for API clients. Here is a patch to fix it.

#2 Updated by Go MAEDA 5 months ago

  • Target version changed from Candidate for next minor release to 3.4.10

Setting the target version to 3.4.10.

#3 Updated by Jean-Philippe Lang 4 months ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fix committed, thanks. Test moved to the API tests.

Also available in: Atom PDF