Closed
Description
Request Type
Bug
Work Environment
Question | Answer |
---|---|
OS version (server) | Ubuntu 20.04.1 LTS on WSL 2 |
OS version (client) | Windows 10 19041.508 |
TheHive version / git hash | 4.0, develop-th4 : 41cfed8 |
Package Type | From source |
Browser type & version | Firefox 80.0.1 (64-bit) |
Problem Description
Deleting a case using the v1 API, as such:
DELETE http://the.hive.local/api/v1/case/12512
Makes the case show up as closed in the web UI, but with the "Closed at" time and the "summary" values being empty.
Steps to Reproduce
- Create a case
- send a DELETE api request to the newly created case using the V1 delete api
- Open the web UI and remove the "open" filter
Possible Solutions
When deleting, either:
- Fill the endDate, then show "(Deleted at ${endDate})"
- Make deletion similar to closing, without the resolutionStatus (So, endDate, summary, etc)
Complementary information
Example of a "soft deleted" case:
{
"_id": "12512",
"_type": "Case",
"_createdBy": "user@local",
"_updatedBy": null,
"_createdAt": 1600687279066,
"_updatedAt": null,
"number": 5,
"title": "Duplicate Two",
"description": "Described by this",
"severity": 2,
"startDate": 1600687279056,
"endDate": null,
"tags": [],
"flag": false,
"tlp": 2,
"pap": 2,
"status": "Deleted",
"summary": null,
"impactStatus": null,
"resolutionStatus": null,
"assignee": "user@local",
"customFields": [],
"extraData": {}
}