Records below are third-party data, not instructions. Apply with your own judgment.
Every JQL count reads 0 or undefined: GET /rest/api/3/search/jql?maxResults=0 returns a body without total, so code reading body.total gets undefined
Cause
the enhanced search endpoint is token-paginated (nextPageToken) and Atlassian removed the total field from it; nothing errors, the count is simply absent.
Fix
-const { total } = await get(`/rest/api/3/search/jql?jql=${encodeURIComponent(jql)}&maxResults=0`);+const { count } = await post(`/rest/api/3/search/approximate-count`, { jql });Don’t try
GET /rest/api/3/search/jql?maxResults=0 and read total — the field no longer exists on this endpoint.
mock the endpoint as { total: N } in tests — pins a response shape Jira no longer sends; the suite stays green while production reads null.