Do issues disappear on purpose?

I have several issues that seem to have disappeared and I’d like to know if this is expected behavior.

Each month I take a snapshot of issues from several different instances of SQ (mostly 7.9 and up) and process metrics on them. The numbers don’t quite make sense from month to month and after doing some digging it looks like some issues disappear.

Key Date Status
AW7_s0cQURe7g0uaMYs5 December 2019 Open
AW7_s0cQURe7g0uaMYs5 January 2020 Closed
AW7_s0cQURe7g0uaMYs5 February 2020 Closed
AW7_s0cQURe7g0uaMYs5 March 2020 Missing

The project still exists with the same key, but this specific issue is no longer found.

/api/issues/search?issues=AW7_s0cQURe7g0uaMYs5

returns

{
"total": 0,
"p": 1,
"ps": 100,
"paging": {
    "pageIndex": 1,
    "pageSize": 100,
    "total": 0
},
"effortTotal": 0,
"debtTotal": 0,
"issues": [],
"components": [],
"facets": []

}

It’s difficult to get month to month trends if issues flat out disappear. Is this normal? What could cause this?

Hi,

Welcome to the community!

Closed issues are purged after 30 days, so what you’re seeing is perfectly normal.

 
HTH,
Ann

This doesn’t seem to be the case universally. I literally just pulled this issue from the API. It was closed in November of 2019.

“issues”: [
{
“key”: “AW5lfd3cURe7g0ua4trv”,
“rule”: “squid:S4435”,
“severity”: “CRITICAL”,
“component”: “###################”,
“project”: “##############”,
“hash”: “c9720db260ed2b171819b4e4ab45dc30”,
“textRange”: {
“startLine”: 63,
“endLine”: 63,
“startOffset”: 29,
“endOffset”: 59
},
“flows”: ,
“resolution”: “FIXED”,
“status”: “CLOSED”,
“message”: “Secure this “Transformer” by either disabling external DTDs or enabling secure processing.”,
“effort”: “5min”,
“debt”: “5min”,
“author”: “################”,
“tags”: [
“cwe”,
“owasp-a4”
],
“creationDate”: “2019-11-13T15:58:20+0000”,
“updateDate”: “2019-11-13T20:45:10+0000”,
“closeDate”: “2019-11-13T20:45:10+0000”,
“type”: “VULNERABILITY”,
“organization”: “default-organization”,
“fromHotspot”: false
}
],

Housekeeping is triggered by a new analysis – has the project where that issue came from been reanalysed more than 30 days after that issue closed?

For historical reporting, you may be more interested in GET api/measures/search_history rather than the data returned by the issues Web API.

1 Like

OK that explains it. I communicate with several instances in a large organization so it can be hard to keep track of all the moving pieces. I’ll add this bit of info into my logic.

Thanks for the quick replies!