From 0cc569aef6f1c3e143af05dbb9bb28715c228593 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 4 Jul 2026 16:27:32 -0500 Subject: [PATCH] fix: render org teams list and make issue type editable (#720, #721) #720: org Teams page wrote ctx.Data["OrgListTeams"] but the template iterates .Teams, so no teams rendered. Use the canonical Teams key (matches org/home.go). #721: issue type sidebar gated editing on a FieldEditFlags data key that no handler sets (always nil -> always read-only). Use HasIssuesOrPullsWritePermission like the priority field; the /custom-type endpoint is already protected by reqRepoIssuesOrPullsWriter. --- CHANGELOG.md | 2 ++ routers/web/org/teams.go | 2 +- templates/repo/issue/sidebar/issue_type.tmpl | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64ac781fde..e45eaa9105 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,8 @@ - Cherry-pick upstream v1.26.4: walk git log context error handling — regression fix (#38185) ### Fixed +- Org Teams page: list now renders — the handler wrote `ctx.Data["OrgListTeams"]` but the template reads `.Teams`, so the page showed header/nav but no teams (#720) +- Issue type: now editable after creation for users with issue write permission — the sidebar gated editing on a `FieldEditFlags` data key that was never populated (always read-only); now uses `HasIssuesOrPullsWritePermission` like the priority field (#721) - Admin config form: radio inputs (e.g. instance landing page Mode) no longer throw "Unsupported config form value mapping", which had aborted all JS init on the admin settings page - PR check branch policy: allow `fix/*` → `main` and `patch/*` → `main` to match documented policy (was rejecting fix/patch PRs to main) - PR check platform detection: guard for missing `.mokogitea/manifest.xml` so the Validate PR job no longer aborts under `set -e` (manifest replaced by metadata API) diff --git a/routers/web/org/teams.go b/routers/web/org/teams.go index fc6e82231f..819c9a793b 100644 --- a/routers/web/org/teams.go +++ b/routers/web/org/teams.go @@ -98,7 +98,7 @@ func Teams(ctx *context.Context) { } } - ctx.Data["OrgListTeams"] = teams + ctx.Data["Teams"] = teams ctx.Data["Keyword"] = keyword pager := context.NewPagination(count, setting.UI.MembersPagingNum, page, 5) pager.AddParamFromRequest(ctx.Req) diff --git a/templates/repo/issue/sidebar/issue_type.tmpl b/templates/repo/issue/sidebar/issue_type.tmpl index 42fb18277f..bb41078ff9 100644 --- a/templates/repo/issue/sidebar/issue_type.tmpl +++ b/templates/repo/issue/sidebar/issue_type.tmpl @@ -2,7 +2,7 @@
{{ctx.Locale.Tr "repo.issues.type"}} - {{$canModify := and .FieldEditFlags .FieldEditFlags.CustomFields}} + {{$canModify := .HasIssuesOrPullsWritePermission}} {{if $canModify}}
{{$.CsrfTokenHtml}} -- 2.52.0