{"record":{"id":"36050b4a5bf812fe","repo":"multica-ai/multica","slug":"team-issue-scope-is-not-supported-by-the-table-que","errorCode":null,"errorMessage":"Team issue scope is not supported by the Table query","messagePattern":"Team issue scope is not supported by the Table query","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/views/issues/surface/use-issue-surface-controller.ts","lineNumber":413,"sourceCode":"          project_id: scope.projectId,\n          ...(assigneeTypes ? { assignee_types: assigneeTypes } : {}),\n        };\n        break;\n      }\n      case \"my\":\n        queryScope = {\n          kind: \"my\",\n          relation: scope.relation === \"all\" ? \"any\" : scope.relation,\n        };\n        break;\n      case \"actor\":\n        queryScope = {\n          kind: scope.relation === \"assigned\" ? \"assignee\" : \"creator\",\n          actor: { type: scope.actorType, id: scope.actorId },\n        };\n        break;\n      case \"team\":\n        throw new Error(\"Team issue scope is not supported by the Table query\");\n    }\n\n    const date =\n      dateParams.date_field && dateParams.date_start && dateParams.date_end\n        ? {\n            field: dateParams.date_field,\n            start: dateParams.date_start,\n            end: dateParams.date_end,\n          }\n        : undefined;\n    return {\n      scope: queryScope,\n      filters: {\n        ...(statusFilters.length > 0 ? { statuses: statusFilters } : {}),\n        ...(priorityFilters.length > 0 ? { priorities: priorityFilters } : {}),\n        ...(assigneeFilters.length > 0 ? { assignees: assigneeFilters } : {}),\n        ...(includeNoAssignee ? { include_no_assignee: true } : {}),\n        ...(creatorFilters.length > 0 ? { creators: creatorFilters } : {}),","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/packages/views/issues/surface/use-issue-surface-controller.ts#L395-L431","documentation":"Thrown by the scope-mapping switch in use-issue-surface-controller.ts: the UI can represent a 'team' issue scope (issues related to a team), but the Table query API only accepts 'my' and 'actor' scope kinds. Selecting a team scope while the Table surface is active hits the unmapped case and throws. It is a capability gap between the scope model and the table query contract, not a data error.","triggerScenarios":"User picks a team-filtered view that renders through the Table query (e.g. switching surface from board/list to table while a team scope is active, or a saved view with team scope loaded in the table surface); any code path that calls the table query builder with scope.kind === 'team'.","commonSituations":"Saved views created in another surface that includes team scope; new team-scope UI shipped before table query support; deep links carrying a team scope param into the table surface.","solutions":["Change the view scope away from team before using the Table surface (immediate user workaround).","If you own the code: gate the team scope picker option (or map it to a supported equivalent such as actor scope with the team's actor id) when the active surface is the table.","Longer term: extend the Table query scope contract on the server to accept kind 'team', then remove the throw.","Audit saved views/deep links for team scopes that can land on the table surface and normalize them on load."],"exampleFix":"// before\ncase \"team\":\n  throw new Error(\"Team issue scope is not supported by the Table query\");\n\n// after — fall back to a supported scope so the table renders\ncase \"team\":\n  queryScope = { kind: \"my\", relation: \"any\" };\n  break;","handlingStrategy":"validation","validationCode":"// Before switching to / rendering the Table surface\ncanQueryTable(scope) ? renderTable() : clampScopeToSupported(scope);","typeGuard":"function isTableQueryableScope(scope: IssueScope): boolean {\n  return scope.kind !== \"team\";\n}","tryCatchPattern":null,"preventionTips":["Gate the team-scope option in the scope picker while the table surface is active.","Normalize saved views and deep links on load: remap or reject team scopes for the table surface.","Add a unit test over every scope kind x surface combination so new scope kinds fail CI, not users."],"tags":["issues","scope","table-query","ui-state","typescript"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}