summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJimmy Praet <jimmy.praet@telenet.be>2021-01-18 06:13:15 +0100
committerGitHub <noreply@github.com>2021-01-18 07:13:15 +0200
commitf95dce2f100fa449cdb40b2de70f1992f70db9a1 (patch)
tree365995c72936023b93c34a639e6c277ee9d4d6f1
parent8e39157e92e2c027d98956aeb0859fc5e2b44888 (diff)
downloadgitea-f95dce2f100fa449cdb40b2de70f1992f70db9a1.tar.gz
gitea-f95dce2f100fa449cdb40b2de70f1992f70db9a1.zip
exclude authored PRs from Review Requested filter (#14368)
Co-authored-by: Lauris BH <lauris@nix.lv>
-rw-r--r--models/issue.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/models/issue.go b/models/issue.go
index 3cd85dc6af..1374f82fbd 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -1254,6 +1254,7 @@ func applyMentionedCondition(sess *xorm.Session, mentionedID int64) *xorm.Sessio
func applyReviewRequestedCondition(sess *xorm.Session, reviewRequestedID int64) *xorm.Session {
return sess.Join("INNER", []string{"review", "r"}, "issue.id = r.issue_id").
+ And("issue.poster_id <> ?", reviewRequestedID).
And("r.type = ?", ReviewTypeRequest).
And("r.reviewer_id = ? and r.id in (select max(id) from review where issue_id = r.issue_id and reviewer_id = r.reviewer_id and type in (?, ?, ?))"+
" or r.reviewer_team_id in (select team_id from team_user where uid = ?)",