The below "get" request is displaying all the Jira tickets for a specific project. I provided the types of what the current getBacklogDashboard is returning. I have tried a bunch of solutions around "&orderBy=priority=desc".
`interface JiraIssue {
id: string;
key: string;
fields: {
summary: string;
created: string;
status: {
name: string;
id: string;
};
priority: {
name: string;
id: string;
};
project: {
name: string;
};
issuetype: {
name: string;
id: string;
}
};
editmeta: {
fields: {
priority: {
allowedValues: {
id: string;
name: string;
}[];
};
issuetype: {
allowedValues: {
id: string;
name: string;
}[];
};
};
};
}`
`async function getBacklogDashboard(
query: string,
page: number
): Promise<JiraDashboardResponse> {
const startAt = (page - 1) * 50;
const dashboardResult = await jiraFetcher({
jiraPath: `/search?jql=project=${query}&fields=summary,status,created,priority,project,issuetype&expand=editmeta&issuetypeIds&fieldsByKeys=true&startAt=${
startAt ? startAt : 0
}`,
});`