fix: render org teams list and make issue type editable (#720, #721) #726

Merged
jmiller merged 1 commits from fix/team-list-and-issue-type-editable into main 2026-07-04 21:32:05 +00:00
Owner

Fixes two bug-labeled issues.

#720 — Org Teams page shows no teams

routers/web/org/teams.go populated ctx.Data["OrgListTeams"], but templates/org/team/teams.tmpl iterates {{range .Teams}}. That key is read nowhere else, so the list was always empty — page rendered header/nav but no teams, no error. Fixed by writing the canonical ctx.Data["Teams"] (same key org/home.go uses).

#721 — Issue type not editable after creation

templates/repo/issue/sidebar/issue_type.tmpl gated its edit form on {{$canModify := and .FieldEditFlags .FieldEditFlags.CustomFields}}, but no handler ever sets FieldEditFlags → always nil → the type was permanently read-only. Its twin issue_priority.tmpl correctly uses HasIssuesOrPullsWritePermission; aligned type to match.

Verified:

  • HasIssuesOrPullsWritePermission is set on the issue view (issue_view.go:450,495), so the dropdown now shows for writers.
  • The /{id}/custom-type POST is already protected by reqRepoIssuesOrPullsWriter (web.go:1456) and the handler validates the type belongs to the repo's org — so exposing the form to writers is safe.

Note: #721 also requested multi-select types and issue-template linking — those are enhancements beyond the "not editable" bug and are not included here.

Fixes two bug-labeled issues. ## #720 — Org Teams page shows no teams `routers/web/org/teams.go` populated `ctx.Data["OrgListTeams"]`, but `templates/org/team/teams.tmpl` iterates `{{range .Teams}}`. That key is read nowhere else, so the list was always empty — page rendered header/nav but no teams, no error. Fixed by writing the canonical `ctx.Data["Teams"]` (same key `org/home.go` uses). ## #721 — Issue type not editable after creation `templates/repo/issue/sidebar/issue_type.tmpl` gated its edit form on `{{$canModify := and .FieldEditFlags .FieldEditFlags.CustomFields}}`, but **no handler ever sets `FieldEditFlags`** → always nil → the type was permanently read-only. Its twin `issue_priority.tmpl` correctly uses `HasIssuesOrPullsWritePermission`; aligned type to match. Verified: - `HasIssuesOrPullsWritePermission` is set on the issue view (`issue_view.go:450,495`), so the dropdown now shows for writers. - The `/{id}/custom-type` POST is already protected by `reqRepoIssuesOrPullsWriter` (`web.go:1456`) and the handler validates the type belongs to the repo's org — so exposing the form to writers is safe. Note: #721 also requested multi-select types and issue-template linking — those are enhancements beyond the "not editable" bug and are not included here.
jmiller added 1 commit 2026-07-04 21:28:15 +00:00
fix: render org teams list and make issue type editable (#720, #721)
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 2s
Universal: PR Check / Validate PR (pull_request) Successful in 14s
Generic: Project CI / Lint & Validate (pull_request) Successful in 57s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 1m15s
PR RC Release / Build RC Release (pull_request) Successful in 2m18s
Universal: PR Check / Secret Scan (pull_request) Successful in 2m19s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Failing after 1m10s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 9m20s
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
0cc569aef6
#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.
jmiller merged commit 5ffed39449 into main 2026-07-04 21:32:05 +00:00
jmiller deleted branch fix/team-list-and-issue-type-editable 2026-07-04 21:32:06 +00:00
Sign in to join this conversation.