{"record":{"id":"f0e43d0b474cb649","repo":"gastownhall/beads","slug":"no-jira-project-configured-run-bd-config-set-jira","errorCode":null,"errorMessage":"no Jira project configured\nRun: bd config set jira.project \"PROJ\"\nOr:  bd config set jira.projects \"PROJ1,PROJ2\"","messagePattern":"no Jira project configured\nRun: bd config set jira\\.project \"PROJ\"\nOr:  bd config set jira\\.projects \"PROJ1,PROJ2\"","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/jira.go","lineNumber":348,"sourceCode":"// validateJiraConfig checks that required Jira configuration is present.\nfunc validateJiraConfig() error {\n\tif err := ensureStoreActive(); err != nil {\n\t\treturn fmt.Errorf(\"database not available: %w\", err)\n\t}\n\n\tctx := rootCtx\n\tjiraURL, _ := store.GetConfig(ctx, \"jira.url\")\n\n\tif jiraURL == \"\" {\n\t\treturn fmt.Errorf(\"jira.url not configured\\nRun: bd config set jira.url \\\"https://company.atlassian.net\\\"\")\n\t}\n\n\t// Check for project configuration (singular or plural).\n\tpluralProjects, _ := store.GetConfig(ctx, \"jira.projects\")\n\tsingularProject, _ := store.GetConfig(ctx, \"jira.project\")\n\tprojectKeys := tracker.ResolveProjectIDs(nil, pluralProjects, singularProject)\n\tif len(projectKeys) == 0 {\n\t\treturn fmt.Errorf(\"no Jira project configured\\nRun: bd config set jira.project \\\"PROJ\\\"\\nOr:  bd config set jira.projects \\\"PROJ1,PROJ2\\\"\")\n\t}\n\n\tapiToken, _ := store.GetConfig(ctx, \"jira.api_token\")\n\tif apiToken == \"\" && os.Getenv(\"JIRA_API_TOKEN\") == \"\" {\n\t\treturn fmt.Errorf(\"Jira API token not configured\\nRun: bd config set jira.api_token \\\"YOUR_TOKEN\\\"\\nOr: export JIRA_API_TOKEN=YOUR_TOKEN\")\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":330,"sourceCodeEnd":358,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/jira.go#L330-L358","documentation":"After the URL check, validateJiraConfig resolves project keys from 'jira.projects' (plural) or 'jira.project' (singular) via tracker.ResolveProjectIDs. If neither is set, it returns this fixed remediation message — bd does not know which Jira projects to sync issues with.","triggerScenarios":"Running `bd jira sync|push|pull` when both jira.project and jira.projects config keys are empty/unset, so ResolveProjectIDs yields zero keys.","commonSituations":"Only jira.url was configured during setup; keys were set in a different workspace/DB; a config migration or export dropped the project keys; user assumed the URL implies the project.","solutions":["Run: bd config set jira.project \"PROJ\" (single project)","Or for multiple: bd config set jira.projects \"PROJ1,PROJ2\"","Verify with bd config get jira.project / bd config get jira.projects, then re-run the command"],"exampleFix":"// before\n$ bd jira sync\nno Jira project configured\n// after\n$ bd config set jira.projects \"BEADS,OPS\"\n$ bd jira sync","handlingStrategy":"validation","validationCode":"proj, _ := store.GetConfig(ctx, \"jira.project\")\nprojs, _ := store.GetConfig(ctx, \"jira.projects\")\nif strings.TrimSpace(proj) == \"\" && strings.TrimSpace(projs) == \"\" {\n    return errors.New(`no Jira project configured: bd config set jira.project \"PROJ\"`)\n}","typeGuard":null,"tryCatchPattern":"if err := runJiraPush(cmd, args); err != nil {\n    if strings.Contains(err.Error(), \"no Jira project configured\") {\n        fmt.Fprintln(os.Stderr, \"Set jira.project or jira.projects before syncing\")\n        os.Exit(1)\n    }\n    return err\n}","preventionTips":["Configure jira.project (or jira.projects for multiple) alongside jira.url","Document required keys in the team onboarding doc — config lives in the local DB","List configured projects with bd config get jira.projects before pushing"],"tags":["jira","configuration","validation"],"backgroundTag":"missing-config-key","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}