Allow setting bug flags when creating/updating attachment with API

RESOLVED FIXED

Status

()

enhancement
RESOLVED FIXED
9 months ago
3 months ago

People

(Reporter: kohei, Assigned: kohei)

Tracking

Production

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

A request from :janx. On the attachment details web interface, you can set the needinfo flag while updating the attachment’s flags and leaving a comment. The current API allows to leave a comment, but you can’t set needinfo.

I’m adding the `bug_flags` param to both the creating an attachment (POST) and updating an attachment (PUT) API methods, so you can do the same thing as the web UI.

https://bmo.readthedocs.io/en/latest/api/core/v1/attachment.html
This is what :janx said on IRC: I'm trying to use Bugzilla's rest API to do 3 things at once: 1) clear an attachment flag, 2) post a comment, 3) set a needinfo? on someone

In this case, the PUT data will looks like this:

```js
{
  flags: [{ name: 'feedback', status: 'X', }],
  comment: 'Looks good to me. What do you think, Kohei?',
  bug_flags: [{ name: 'needinfo', status: '?', requestee: 'kohei.yoshino@gmail.com', }],
}
```
Merged to master.
Status: ASSIGNED → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → FIXED
No longer blocks: 1527178
You need to log in before you can comment on or make changes to this bug.