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 doubled issue tab introduced in migration v16 #2611

Merged
merged 5 commits into from
Sep 28, 2017

Conversation

daviian
Copy link
Member

@daviian daviian commented Sep 26, 2017

Migration v16 creates UnitTypeIssue and UnitTypeExternalTracker for each repository with enabled external issue tracker as repo.EnableIssues is true even for external tracker.

And because both Unit Types exist the issue tab is shown twice.

The same behaviour is happening to UnitTypeWiki and UnitTypeExternalWiki, but because the tab is not changed in view it has no visual impact.

PR fixes both mistakes and removes UnitTypeIssue for repositories with UniTypeExternalTracker and removes UnitTypeWiki for repositories with UnitTypeExternalWiki.

…are existing at the same time

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
@codecov-io
Copy link

codecov-io commented Sep 26, 2017

Codecov Report

Merging #2611 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #2611   +/-   ##
======================================
  Coverage    27.3%   27.3%           
======================================
  Files          86      86           
  Lines       17139   17139           
======================================
  Hits         4680    4680           
  Misses      11781   11781           
  Partials      678     678

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc84ca4...4c0da6c. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 26, 2017
)

var externalIssueRepos []Repo
err := x.Table("repository").Select("`repository`.id").
Copy link
Member

Choose a reason for hiding this comment

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

No need for repository table here. Just select form repo_unit directly

}

var externalWikiRepos []Repo
err = x.Table("repository").Select("`repository`.id").
Copy link
Member

Choose a reason for hiding this comment

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

Same as above

@daviian
Copy link
Member Author

daviian commented Sep 27, 2017

@lafriks Included your requested changes

@lafriks lafriks added this to the 1.3.0 milestone Sep 27, 2017
@lafriks
Copy link
Member

lafriks commented Sep 27, 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 Sep 27, 2017
@Morlinest
Copy link
Member

LGTM :)

@lunny
Copy link
Member

lunny commented Sep 28, 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 Sep 28, 2017
@lafriks
Copy link
Member

lafriks commented Sep 28, 2017

Make LG-TM work

@lafriks lafriks merged commit 26e49b8 into go-gitea:master Sep 28, 2017
@daviian daviian deleted the bugfix/doubled-issues-unit-type branch September 28, 2017 18:25
@lafriks lafriks added the backport/done All backports for this PR have been created label Oct 4, 2017
@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
backport/done All backports for this PR have been created 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.

6 participants