-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 counts on issues dashboard #2215
Conversation
models/issue.go
Outdated
func Issues(opts *IssuesOptions) ([]*Issue, error) { | ||
var sess *xorm.Session | ||
if opts.Page >= 0 { | ||
func (opts *IssuesOptions) setupSess(sess *xorm.Session) error { |
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.
Why not change this function name to setupSession
? It would be more precise.
Can you add integration test for this? |
@lafriks Test added. I decided to add a unit test instead of an integration test; IMO it's not sustainable to have a separate integration test for every possible corner case. |
e9745a4
to
a86d736
Compare
When I visit http://localhost:3000/issues?type=all&repo=2&sort=&state=open, 500 returned.
|
|
@lunny Good catch, fixed |
LGTM |
LGTM |
Fixes #1325.
There is still a problem with the
In your repositories
/Assigned to you
/Created by you
counts, which always show the open counts, even if the user is looking at closed issues. I will fix this is a separate PR.