summaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/issue.go7
-rw-r--r--routers/repo/setting.go1
2 files changed, 7 insertions, 1 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index f638b6f51f..8e8328c7e4 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -52,10 +52,15 @@ var (
)
func MustEnableIssues(ctx *context.Context) {
- if !ctx.Repo.Repository.EnableIssues || ctx.Repo.Repository.EnableExternalTracker {
+ if !ctx.Repo.Repository.EnableIssues {
ctx.Handle(404, "MustEnableIssues", nil)
return
}
+
+ if ctx.Repo.Repository.EnableExternalTracker {
+ ctx.Redirect(ctx.Repo.Repository.ExternalTrackerURL)
+ return
+ }
}
func MustAllowPulls(ctx *context.Context) {
diff --git a/routers/repo/setting.go b/routers/repo/setting.go
index 4bcc470e99..869b98897c 100644
--- a/routers/repo/setting.go
+++ b/routers/repo/setting.go
@@ -146,6 +146,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
repo.ExternalWikiURL = form.ExternalWikiURL
repo.EnableIssues = form.EnableIssues
repo.EnableExternalTracker = form.EnableExternalTracker
+ repo.ExternalTrackerURL = form.ExternalTrackerURL
repo.ExternalTrackerFormat = form.TrackerURLFormat
repo.ExternalTrackerStyle = form.TrackerIssueStyle
repo.EnablePulls = form.EnablePulls