Open Bug 1350132 Opened 8 years ago Updated 6 years ago

Allow setting bug assignee at the same time as creating attachment via REST API

Categories

(bugzilla.mozilla.org :: API, enhancement, P2)

Production
enhancement

Tracking

()

People

(Reporter: emorley, Unassigned)

References

Details

(Keywords: bmo-small)

Currently it's not possible to set the assignee at the same time as creating/updating attachments when using the REST API: https://bugzilla.readthedocs.io/en/latest/api/core/v1/attachment.html#create-attachment Compare this to the web UI, where you can create an attachment and assign the bug in one action. Currently this has to be done via two separate REST API calls, which results in additional bugmail.
Keywords: bmo-small
Priority: -- → P2
sketch: around here: https://github.com/mozilla-bteam/bmo/blob/cc3141625e4c87387259c38e4ab5f56820621768/Bugzilla/WebService/Bug.pm#L926 if ($params->{takebug}) { $bug->set_assigned_to(Bugzilla->user); } should be sufficient. Testing should be done though. And it would need to be added to the docs: https://github.com/mozilla-bteam/bmo/blob/cc3141625e4c87387259c38e4ab5f56820621768/docs/en/rst/api/core/v1/attachment.rst#create-attachment
Ah so my use-case was for a tool that is performing GitHub->Bugzilla sync using the BMO REST API (bug 1351785). Such a tool wants to add attachments and set assignees with as little bugspam generated as possible. The proposal in comment 1 would only allow setting the assignee to the tool's bot account, and not the account of the user who opened the PR.
See Also: → 1487171
You need to log in before you can comment on or make changes to this bug.