Open Bug 1792810 Opened 2 years ago Updated 5 months ago

API bug update doesn't work in 5.0.6

Categories

(Bugzilla :: WebService, defect)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: mkoteswararao.nird, Unassigned)

Details

Attachments

(1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.50

Steps to reproduce:

I have installed Bugzilla 5.6 and testing the API. I am using postman to test

  1. Created User using API - Worked
  2. fetched toke using API - worked
  3. To create a bug with API - worked.
  4. When I try to update the bug status to RESOLVED(part of header) using API I get the HTTP 200 OK
  5. But the status doesn't change nor does the response show the status.
  6. I observed Bugzilla behaves weirdly when email is not configured. As email is sent when a bug is updated.
  7. I configured a working email but still the response is the same.

Actual results:

Request
http://mybugzilla.com/rest/bug/1?token=1-QjsJY2NaR4

Here is the response
{
"bugs": [
{
"changes": {},
"id": 1,
"last_change_time": "2022-09-14T11:53:34Z",
"alias": []
}
]
}

Expected results:

{
"bugs" : [
{
"alias" : [],
"changes" : {
"keywords" : {
"added" : "funny, stupid",
"removed" : ""
},
"status" : {
"added" : "IN_PROGRESS",
"removed" : "CONFIRMED"
}
},
"id" : 1,
"last_change_time" : "2022-09-14T11:53:34Z"
}
]
}

At least response should indicate what is going wrong.

Assignee: nobody → webservice
Component: API → WebService
Product: bugzilla.mozilla.org → Bugzilla
QA Contact: default-qa
Version: Production → unspecified

I'm assuming you mean Bugzilla 5.0.6 ? We haven't released a 5.6 yet.

According to the docs, updating will fail if you specify a "closed" status and fail to specify a resolution. You don't have your payload here for what you POSTed, so I'm not sure what you passed other than your description saying you tried to change the status to resolved.

That said, if it's going to fail for that reason, it should actually give you an error instead of just silently taking it....

Oops, that was me, sorry about that. I was messing with the settings on the bot account yesterday and forgot to switch back to my account.

(In reply to bugbot on irc.libera.chat from comment #1)

I'm assuming you mean Bugzilla 5.0.6 ? We haven't released a 5.6 yet.

Yes 5.0.6 my mistake. I tried with only two parameters status and resolution. The bug currently is in "IN_PROGRESS" state. However, I am changed the values of Priority, Severity, Version, Hardware, OS etc. Could that be a problem?

Summary: API bug update doesn't work in 5.6 → API bug update doesn't work in 5.0.6

Important, I changed the workflow after adding 2 additional status fields. Is it likely the bug update API misbehaves if we add additional custom status fields and change bug status workflow?

Attachment #9381308 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: