Skip to content

Commit 71f6256

Browse files
committed
fix(jira): rely solely on nextPageToken for end-of-results
data.isLast on /rest/api/3/search/jql is unreliable (JRACLOUD-95477) and the previous OR-with-isLast logic could truncate pagination early if Jira ever returned isLast=true alongside a valid nextPageToken.
1 parent 591874c commit 71f6256

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

apps/sim/connectors/jira/jira.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,14 @@ export const jiraConnector: ConnectorConfig = {
221221

222222
const data = await response.json()
223223
let issues = (data.issues || []) as Record<string, unknown>[]
224+
/**
225+
* `/rest/api/3/search/jql` signals end-of-results purely by the absence
226+
* of `nextPageToken`. `data.isLast` is unreliable on this endpoint and
227+
* has been observed returning `true` alongside a valid token
228+
* (JRACLOUD-95477), so we ignore it.
229+
*/
224230
const nextPageToken = data.nextPageToken as string | undefined
225-
const isLast = Boolean(data.isLast) || !nextPageToken
231+
const isLast = !nextPageToken
226232

227233
if (maxIssues > 0 && issues.length > remaining) {
228234
issues = issues.slice(0, remaining)

0 commit comments

Comments
 (0)