-
-
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 assigned issues dashboard #920
Fix assigned issues dashboard #920
Conversation
* Fix assigned/created issues in dashboard. * Use GetUserIssueStats for getting all Dashboard stats. * Use gofmt to format the file properly. * Replace &Issue{} with new(Issue). * Check if user has access to given repository. * Remove unnecessary filtering of issues. * Return 404 error if invalid repository is given. * Use correct number of issues in paginater.
@jeppech could you try to confirm this? |
@lunny This works perfectly, thank you! |
|
||
openCountSession := countSession(false, isPull, repoID, repoIDs) | ||
closedCountSession := countSession(true, isPull, repoID, repoIDs) | ||
stats.YourRepositoriesCount, _ = countSession(false, isPull, repoID, repoIDs). |
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 don't like this. We're essentially assuming that the repositories in repoIDs
are exactly the set of repositories that some user owns. Moreover, this will return the wrong count if repoID > 0
.
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.
It would be nice if we could change the interface of GetUserIssueStats
so that we don't need to make these sort of implicit assumptions.
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 cherry-pick from gogs/gogs#3560 and resolved the conflicts. I think we can improve this in further PRs.
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.
Ok fine
LGTM |
LGTM |
Update to 43c94d0 give me that: |
Have you recompile Gitea? |
Ops. First time when a forgot this, sorry. |
fix #503