Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make sql query PostgreSQL compatible #8163

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions backend/plugins/dora/tasks/incident_from_issue_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ func ConvertIssuesToIncidents(taskCtx plugin.SubTaskContext) errors.Error {
FROM issues i
LEFT JOIN board_issues bi ON bi.issue_id = i.id
LEFT JOIN project_mapping pm ON pm.row_id = bi.board_id
WHERE i.type = "INCIDENT"
WHERE i.type = ?
AND pm.project_name = ?
AND pm.table = "boards")
AND pm.table = ?)
`
if err := db.Exec(deleteIncidentsSql, data.Options.ProjectName); err != nil {
if err := db.Exec(deleteIncidentsSql, "INCIDENT", data.Options.ProjectName, "boards"); err != nil {
return errors.Default.Wrap(err, "error deleting previous incidents")

}
Expand All @@ -73,11 +73,11 @@ func ConvertIssuesToIncidents(taskCtx plugin.SubTaskContext) errors.Error {
FROM issues i
LEFT JOIN board_issues bi ON bi.issue_id = i.id
LEFT JOIN project_mapping pm ON pm.row_id = bi.board_id
WHERE i.type = "INCIDENT"
WHERE i.type = ?
AND pm.project_name = ?
AND pm.table = "boards")
AND pm.table = ?)
`
if err := db.Exec(deleteIncidentAssigneesSql, data.Options.ProjectName); err != nil {
if err := db.Exec(deleteIncidentAssigneesSql, "INCIDENT", data.Options.ProjectName, "boards"); err != nil {
return errors.Default.Wrap(err, "error deleting previous incident_assignees")
}

Expand Down
Loading