apache / trafficcontrol

Apache Traffic Control is an Open Source implementation of a Content Delivery Network
https://trafficcontrol.apache.org/
Apache License 2.0
1.09k stars 344 forks source link

Unassigning a delivery service request that is already unassigned results in null #4169

Open ericholguin opened 4 years ago

ericholguin commented 4 years ago

I'm submitting a ...

Traffic Control components affected ...

Current behavior:

When a delivery service request is already unassigned, and sending a PUT request to deliveryservice_requests/{{id}}/assign with {"assigneeId": null} in the body returns:

HTTP/1.1 200 OK
{
    "alerts": [
        {
            "text": "deliveryservice_request was updated.",
            "level": "success"
        }
    ],
    "response": {
        "authorId": null,
        "author": null,
        "changeType": null,
        "createdAt": null,
        "id": 4,
        "lastEditedBy": null,
        "lastEditedById": null,
        "lastUpdated": null,
        "deliveryService": null,
        "status": null
    }
}

Expected / new behavior:

The response for when a user is assigned is the same as the response when a user is unassigned, the only difference is that the unassigned response output does not include the assigneeId and assignee key. The Response should be:

HTTP/1.1 200 OK
{
    "alerts": [
        {
            "text": "deliveryservice_request was updated.",
            "level": "success"
        }
    ],
"response": {
        .
        .
        .
        },
        "status": "submitted"
    }
}

Minimal reproduction of the problem with instructions:

Anything else:

ocket8888 commented 4 years ago

Anybody know if this is a regression?

mitchell852 commented 4 years ago

Anybody know if this is a regression?

I doubt it. Probably always been this way.