@danypops/tickets 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/adapters/jira.ts +5 -2
package/package.json
CHANGED
package/src/adapters/jira.ts
CHANGED
|
@@ -266,9 +266,12 @@ export class JiraRepository {
|
|
|
266
266
|
private async searchJql(jql: string, limit: number): Promise<Issue[]> {
|
|
267
267
|
// searchForIssuesUsingJqlPost hits the deprecated /rest/api/2/search, which
|
|
268
268
|
// Atlassian has sunset on Jira Cloud (410 Gone). The enhanced variant posts
|
|
269
|
-
// to the still-live /rest/api/2/search/jql
|
|
269
|
+
// to the still-live /rest/api/2/search/jql -- but unlike the old endpoint
|
|
270
|
+
// (which defaulted to *navigable fields), this one defaults to id-only, so
|
|
271
|
+
// toDomain() would crash on a missing summary/status/etc. without an explicit
|
|
272
|
+
// fields request. "*all" restores the old behavior (including custom fields).
|
|
270
273
|
const result = await this.call<{ issues?: JiraIssue[] }>(() =>
|
|
271
|
-
this.client.issueSearch.searchForIssuesUsingJqlEnhancedSearchPost({ jql, maxResults: limit }),
|
|
274
|
+
this.client.issueSearch.searchForIssuesUsingJqlEnhancedSearchPost({ jql, maxResults: limit, fields: ["*all"] }),
|
|
272
275
|
);
|
|
273
276
|
return (result?.issues ?? []).map((raw) => this.toDomain(raw));
|
|
274
277
|
}
|