diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-02-04 22:35:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-04 22:35:08 +0800 |
commit | 8574a6433fab47b6f20997f024c176490dfad1c0 (patch) | |
tree | 7ea17ca9fc62897d9632881feb3caf918260b7c3 /models/db | |
parent | 4d20a4a1baeb9ed1bb5b3ed7c44b6046f6387303 (diff) | |
download | gitea-8574a6433fab47b6f20997f024c176490dfad1c0.tar.gz gitea-8574a6433fab47b6f20997f024c176490dfad1c0.zip |
Show all projects, not just repo projects and open/closed projects (#22640)
This PR fixes two problems. One is when filter repository issues, only
repository level projects are listed. Another is if you list open
issues, only open projects will be displayed in filter options and if
you list closed issues, only closed projects will be displayed in filter
options.
In this PR, both repository level and org/user level projects will be
displayed in filter, and both open and closed projects will be listed as
filter items.
---------
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'models/db')
-rw-r--r-- | models/db/search.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/models/db/search.go b/models/db/search.go index f5273cb6f6..26e082756a 100644 --- a/models/db/search.go +++ b/models/db/search.go @@ -27,3 +27,9 @@ const ( SearchOrderByForks SearchOrderBy = "num_forks ASC" SearchOrderByForksReverse SearchOrderBy = "num_forks DESC" ) + +const ( + // Which means a condition to filter the records which don't match any id. + // It's different from zero which means the condition could be ignored. + NoneID = -1 +) |