Closed Bug 1951899 Opened 1 year ago Closed 1 year ago

Bugzilla::Version needs to be exposed in the WebService REST API so you can update product versions

Categories

(Bugzilla :: WebService, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 777047

People

(Reporter: justdave, Unassigned)

Details

David Wright pointed out on the support mailing list that there's no way to update or add versions on a product from the API. Updating/adding components is implemented, though. Cloning the components mechanism should be relatively easy.

But I started looking into what would be needed to fix it, and discovered that perhaps maybe it wasn't implemented because "version" already exists as an object type in the REST API, and it's the version of Bugzilla, not a product version. Maybe we can make it be "versions" with an "s"? Or maybe we just overload it and you get the Bugzilla version if you don't specify anything after it and there's no payload, and if there's a payload then we treat it like a product version object?

I'm liking the overload idea, I think. There would never be a reason to do a GET request with a product version object, because you can actually list them via the product object, and listing a single one would be silly because you'd have to know the name to retrieve it anyway, and if you have that, you already have it. For a product version, you would only be using POST/PUT/DELETE for create/update/delete of versions on a product.

So if you have /rest/version come in as a GET, you return the Bugzilla version. If it comes in as a POST, PUT, or DELETE, then you treat it as a request related to a product version.

Turns out we already had a bug for this after all (with a(n incomplete) patch on it!)

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 777047
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.