Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: don't return the issue that linking to the archived project (#2346)

h3n4l3f85413f11f2
diff --git a/store/issue.go b/store/issue.go
index ee662d857f..063d764ad5 100644
--- a/store/issue.go
+++ b/store/issue.go
@@ -124,8 +124,13 @@ func (s *Store) FindIssue(ctx context.Context, find *api.IssueFind) ([]*api.Issu
if err != nil {
return nil, errors.Wrapf(err, "failed to compose Issue with issueRaw[%+v]", raw)
}
+ // If no specified project, filter out issues belonging to archived project
+ if issue.Project == nil || issue.Project.RowStatus == api.Archived {
+ continue
+ }
issueList = append(issueList, issue)
}
+
return issueList, nil
}
@@ -544,7 +549,7 @@ func (*Store) findIssueImpl(ctx context.Context, tx *sql.Tx, find *api.IssueFind
list = append(list, fmt.Sprintf("$%d", len(args)+1))
args = append(args, status)
}
- where = append(where, fmt.Sprintf("status in (%s)", strings.Join(list, ",")))
+ where = append(where, fmt.Sprintf("status IN (%s)", strings.Join(list, ",")))
}
var query = `