Skip to content

Bug 2072313 - Accept query-string params on Reminders add - #2751

Open
Xzzz wants to merge 1 commit into
mozilla:masterfrom
Xzzz:bug-2072313
Open

Xzzz wants to merge 1 commit into
mozilla:masterfrom
Xzzz:bug-2072313

Conversation

@Xzzz

@Xzzz Xzzz commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Reminders.pm's add() only read parameters from the JSON POST body. Adds the query-string merge that the REST docs promise, reusing the same merge_request_params helper as bugs 2065171/2065173/2072305.

Depends on 2072305 per the bug dependency (both introduce the same shared helper; will collapse to one copy once either merges).

Changes

  • Reuse Bugzilla::WebService::Util::merge_request_params (see 2072305)
  • Reminders.pm add(): query string + JSON body merge instead of JSON-body-only
  • qa/t/rest_reminders.t: cover query-string-only reminder creation

Side effect on bug 2072318: removes the try/catch this change replaces, which included the return inside catch that bug 2072318 was filed against (it never actually aborted add() on malformed JSON). That code no longer exists after this change, so 2072318 is resolved here rather than needing its own patch.

Test plan

  • POST /rest/reminder with bug_id/note/reminder_ts entirely in the query string, no JSON body
  • Existing qa/t/rest_reminders.t cases unaffected

References

add() only read from the JSON body. Reuse the same merge_request_params helper as
bugs 2065171/2065173/2072305 instead of writing another copy. No whitelist needed here:
create() only reads three named keys, not the whole params hash.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant