zed-industries/zed · error · RuntimeError

Field '{field_name}' not found on board

Error message

Field '{field_name}' not found on board

What it means

set_project_field on the guild board resolves field_name against project["fields"]["nodes"] before running updateProjectV2ItemFieldValue; a miss raises with a terse message (no available-names list in this variant). The lookup is exact string equality, so renames, case differences, or the wrong project make it fail before any mutation is sent.

Source

Thrown at script/github-guild-board.py:299

            }
          }
        }
        """,
        {"contentId": content_node_id},
    )
    node = data.get("node") or {}
    for item in (node.get("projectItems") or {}).get("nodes", []):
        if item["project"]["id"] == project_id:
            return item
    return None


def set_project_field(project, item_id, field_name, option_name):
    field = next(
        (f for f in project["fields"]["nodes"] if f.get("name") == field_name), None
    )
    if not field:
        raise RuntimeError(f"Field '{field_name}' not found on board")
    option_id = next(
        (o["id"] for o in field.get("options", []) if o["name"] == option_name), None
    )
    if not option_id:
        raise RuntimeError(f"Option '{option_name}' not found in field '{field_name}'")
    github_graphql(
        """
        mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $optionId: String!) {
          updateProjectV2ItemFieldValue(input: {
            projectId: $projectId, itemId: $itemId, fieldId: $fieldId,
            value: { singleSelectOptionId: $optionId }
          }) { projectV2Item { id } }
        }
        """,
        {
            "projectId": project["id"],
            "itemId": item_id,
            "fieldId": field["id"],

View on GitHub (pinned to bc538def45)

Solutions

  1. List the project's actual field names (they are already in project['fields']['nodes']) and align the script constant exactly
  2. Rename the board field back if the script's name is the source of truth
  3. Confirm PROJECT_NUMBER targets the guild board
  4. Include the available names in the error to make the mismatch self-diagnosing

Example fix

// before
field = next((f for f in project["fields"]["nodes"] if f.get("name") == field_name), None)
if not field:
    raise RuntimeError(f"Field '{field_name}' not found on board")

// after
field = next((f for f in project["fields"]["nodes"] if f.get("name") == field_name), None)
if not field:
    available = [f["name"] for f in project["fields"]["nodes"] if f.get("name")]
    raise RuntimeError(f"Field '{field_name}' not found on board; available: {available}")
Defensive patterns

Strategy: validation

Validate before calling

def board_has_field(project: dict, field_name: str) -> bool:
    return any(f.get("name") == field_name for f in project["fields"]["nodes"])

Type guard

def find_field(project: dict, field_name: str) -> dict | None:
    return next((f for f in project["fields"]["nodes"] if f.get("name") == field_name), None)

Try / catch

try:
    set_project_field(project, item_id, STATUS_FIELD, option)
except RuntimeError as exc:
    if "not found on board" in str(exc):
        log(f"Board field drift: {exc}")
    else:
        raise

Prevention

When it happens

Trigger: Guild board automation runs with a field name (e.g. "Status") that no longer exists on the project — renamed on the board, project recreated from a template, or a stale PROJECT_NUMBER pointing at a different board.

Common situations: Board maintainers rename status fields during process changes; the script's field constants lag the live board; case drift between the constant and the board.

Related errors


AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16). Data as JSON: /api/errors/4b750063c3424b5f. Report an issue: GitHub.