Open Bug 2095730 Opened 23 hours ago Updated 23 hours ago

Fix small issues in the MyDashboard, Review and BugModal API endpoints

Categories

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

Production
defect

Tracking

()

UNCONFIRMED

People

(Reporter: xavier.lhour, Unassigned)

References

Details

Follow-up of bug 2094122

Found while moving these extension endpoints to native Mojo controllers. Except for the last one, they were already in the legacy code and were kept as they were.

MyDashboard, GET /rest/mydashboard/run_last_changes:

  • The last comment query has LIMIT 1 but no ORDER BY, so it returns any comment after changeddate_api, usually the oldest one, not the latest. Add ORDER BY bug_when DESC, comment_id DESC.
  • The query is bound to the bug_id param as given, not to $bug->id: with a bug alias, no comment is ever found.
  • Every comment is rendered as Markdown when use_markdown is on, including comments not written in Markdown. Check $comment->is_markdown too, as EditComments does.

Review, GET /rest/review/flag_activity:

  • The flag_activity_parameters_required error can't be thrown: the date range is always added to the match criteria before the check, so a request without any filter returns every flag change of the last 30 days, up to max_search_results. Run the check before adding the date range.

BugModal, GET /rest/bug_modal/product_info and /new_product/<id>:

  • A repeated ?product= is no longer refused with params_required since bug 2094122: the last value is used. Declare product as a list param and refuse more than one value, or drop the check.
See Also: → 2094122
You need to log in before you can comment on or make changes to this bug.