diff --git a/templates/repo/issue/search.tmpl b/templates/repo/issue/search.tmpl
index 17abe263e7..bdbb9a9daf 100644
--- a/templates/repo/issue/search.tmpl
+++ b/templates/repo/issue/search.tmpl
@@ -8,6 +8,7 @@
+
{{end}}
{{if .PageIsPullList}}
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.pull_kind") "Tooltip" (ctx.Locale.Tr "explore.go_to")}}
diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go
index 56eb97acc5..120fe6534e 100644
--- a/tests/integration/issue_test.go
+++ b/tests/integration/issue_test.go
@@ -1438,6 +1438,47 @@ func TestIssueCount(t *testing.T) {
assert.Contains(t, allCount, "2\u00a0All")
}
+func TestIssueDefaultValues(t *testing.T) {
+ defer tests.PrepareTestEnv(t)()
+
+ links := []string{"/user2/repo1/issues", "/user2/repo1/pulls"}
+ values := []url.Values{
+ {
+ "type": {"created_by"},
+ },
+ {
+ "poster": {"1"},
+ },
+ {
+ "sort": {"latest"},
+ },
+ {
+ "type": {"all"},
+ "sort": {"latest"},
+ "poster": {"1"},
+ },
+ {
+ "type": {"assigned"},
+ "sort": {"oldest"},
+ "poster": {"1"},
+ },
+ }
+
+ for _, link := range links {
+ t.Run(link[13:], func(t *testing.T) {
+ for _, value := range values {
+ req := NewRequestf(t, "GET", "%s?%s", link, value.Encode())
+ resp := MakeRequest(t, req, http.StatusOK)
+
+ htmlDoc := NewHTMLParser(t, resp.Body)
+ for name := range value {
+ assert.Equal(t, value.Get(name), htmlDoc.GetInputValueByName(name))
+ }
+ }
+ })
+ }
+}
+
func TestIssuePostersSearch(t *testing.T) {
defer tests.PrepareTestEnv(t)()