Skip to content
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 search by issue type #1914

Merged
merged 2 commits into from
Jun 15, 2017
Merged

Conversation

ethantkoenig
Copy link
Member

Fixes #1886.

Other fixes/changes:

  • Only display the "Type" menu when the user is logged-in (otherwise a search for "Assigned to you" doesn't make much sense)
  • Fix ambiguous column references in GetIssueStats(..)
  • Proper error handling for GetIssueStats(..)

Count(new(Issue))
case FilterModeCreate:
stats.OpenCount, err = countSession(opts).
And("poster_id = ?", opts.PosterID).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These conditions are already handled in countSession(..), so we don't need to repeat them again here.

</span>
<div class="menu">
<a class="{{if eq .ViewType "all"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type=all&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.all_issues"}}</a>
<a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type=assigned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{.SignedUser.ID}}">{{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assignee param updated to be .Signed.User.ID (might be hard to tell what the non-whitespace changes are)

@lunny lunny added the type/bug label Jun 8, 2017
@lunny lunny added this to the 1.2.0 milestone Jun 8, 2017
@lunny
Copy link
Member

lunny commented Jun 14, 2017

Maybe some integration tests.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 14, 2017
@ethantkoenig
Copy link
Member Author

@lunny Added an integration test

@ethantkoenig ethantkoenig force-pushed the fix/issue_type_search branch 2 times, most recently from 357435e to 4053f83 Compare June 14, 2017 02:20
@lafriks
Copy link
Member

lafriks commented Jun 14, 2017

It fails on postgresql with error pq: operator does not exist: boolean = integer

@ethantkoenig
Copy link
Member Author

@lafriks Fixed

@lunny
Copy link
Member

lunny commented Jun 15, 2017

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 15, 2017
@bkcsoft
Copy link
Member

bkcsoft commented Jun 15, 2017

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 15, 2017
@bkcsoft bkcsoft merged commit 8fcda04 into go-gitea:master Jun 15, 2017
@ethantkoenig ethantkoenig deleted the fix/issue_type_search branch June 15, 2017 03:23
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issues sort by Type menu does not work
5 participants