-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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 Bug in Issue/pulls list #32081
base: main
Are you sure you want to change the base?
Fix Bug in Issue/pulls list #32081
Conversation
…he Open/Closed status
routers/web/repo/issue.go
Outdated
@@ -467,6 +467,9 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption opt | |||
ctx.Data["AssigneeID"] = assigneeID | |||
ctx.Data["PosterID"] = posterID | |||
ctx.Data["Keyword"] = keyword | |||
if isShowClosed.Has() { | |||
ctx.Data["IsShowClosed"] = isShowClosed.Value() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think since IsShowClosed
has 3 states, it's better to change the template. the current implementation has only two states. ctx.Data["IsShowClosed"] = false
is equal to not set the template variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know when state
query parameter is not setted (that also means IsShowClosed
does not have a value), issue list shows opened issues.
I think in that case, ctx.Data["IsShowClosed"] = false
doesn't seemed to be error prone.
Is there are any edge cases that i'm missing?
I found a edge case that select all issue. in that case I'll make not to show open or close button. Is that would be ok?
fix #32080
After
for opened issues
for closed issues
for all issues