diff --git a/backend/api/issueSearchHandler.go b/backend/api/issueSearchHandler.go index fe42c0ac..3acc5d3c 100644 --- a/backend/api/issueSearchHandler.go +++ b/backend/api/issueSearchHandler.go @@ -36,9 +36,10 @@ func issueSearchHandler(c *fiber.Ctx) error { searchResponse := struct { Results []struct { - Id int `json:"id"` - Type string `json:"type"` - Title string `json:"title"` + Id int `json:"id"` + Type string `json:"type"` + Title string `json:"title"` + Project Project `json:"project"` } `json:"results"` }{} @@ -73,6 +74,7 @@ func issueSearchHandler(c *fiber.Ctx) error { issue := Issue{ Id: issue.Id, Subject: issuesResponse.Issues[0].Subject, + Project: issuesResponse.Issues[0].Project, } foundIssues = append(foundIssues, issue) } diff --git a/backend/api/models.go b/backend/api/models.go index 65d8b28d..102e4aa4 100644 --- a/backend/api/models.go +++ b/backend/api/models.go @@ -4,9 +4,14 @@ type user struct { Login string `json:"login"` } +type Project struct { + Id int `json:"id"` +} + type Issue struct { - Id int `json:"id"` - Subject string `json:"subject"` + Id int `json:"id"` + Subject string `json:"subject"` + Project Project `json:"project"` } type IssueWithTitle struct { diff --git a/frontend/src/components/QuickAdd.tsx b/frontend/src/components/QuickAdd.tsx index 975c1381..0b78dd3d 100644 --- a/frontend/src/components/QuickAdd.tsx +++ b/frontend/src/components/QuickAdd.tsx @@ -126,6 +126,7 @@ export const QuickAdd = ({ messages: "0", // projects: "0" produces weird results. open_issues: "1", + projects: "1", }; const foundIssues: { issues: Issue[] } = await fetch(