-
-
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 doubled issue tab introduced in migration v16 #2611
Fix doubled issue tab introduced in migration v16 #2611
Conversation
…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 Report
@@ 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.
|
models/migrations/v44.go
Outdated
) | ||
|
||
var externalIssueRepos []Repo | ||
err := x.Table("repository").Select("`repository`.id"). |
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.
No need for repository table here. Just select form repo_unit directly
models/migrations/v44.go
Outdated
} | ||
|
||
var externalWikiRepos []Repo | ||
err = x.Table("repository").Select("`repository`.id"). |
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.
Same as above
@lafriks Included your requested changes |
LGTM |
LGTM :) |
LGTM |
Make LG-TM work |
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.