gastownhall/beads · error

no Jira project configured Run: bd config set jira.project "

Error message

no Jira project configured
Run: bd config set jira.project "PROJ"
Or:  bd config set jira.projects "PROJ1,PROJ2"

What it means

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.

Source

Thrown at cmd/bd/jira.go:348

// validateJiraConfig checks that required Jira configuration is present.
func validateJiraConfig() error {
	if err := ensureStoreActive(); err != nil {
		return fmt.Errorf("database not available: %w", err)
	}

	ctx := rootCtx
	jiraURL, _ := store.GetConfig(ctx, "jira.url")

	if jiraURL == "" {
		return fmt.Errorf("jira.url not configured\nRun: bd config set jira.url \"https://company.atlassian.net\"")
	}

	// Check for project configuration (singular or plural).
	pluralProjects, _ := store.GetConfig(ctx, "jira.projects")
	singularProject, _ := store.GetConfig(ctx, "jira.project")
	projectKeys := tracker.ResolveProjectIDs(nil, pluralProjects, singularProject)
	if len(projectKeys) == 0 {
		return fmt.Errorf("no Jira project configured\nRun: bd config set jira.project \"PROJ\"\nOr:  bd config set jira.projects \"PROJ1,PROJ2\"")
	}

	apiToken, _ := store.GetConfig(ctx, "jira.api_token")
	if apiToken == "" && os.Getenv("JIRA_API_TOKEN") == "" {
		return fmt.Errorf("Jira API token not configured\nRun: bd config set jira.api_token \"YOUR_TOKEN\"\nOr: export JIRA_API_TOKEN=YOUR_TOKEN")
	}

	return nil
}

View on GitHub (pinned to 71377f2769)

Solutions

  1. Run: bd config set jira.project "PROJ" (single project)
  2. Or for multiple: bd config set jira.projects "PROJ1,PROJ2"
  3. Verify with bd config get jira.project / bd config get jira.projects, then re-run the command

Example fix

// before
$ bd jira sync
no Jira project configured
// after
$ bd config set jira.projects "BEADS,OPS"
$ bd jira sync
Defensive patterns

Strategy: validation

Validate before calling

proj, _ := store.GetConfig(ctx, "jira.project")
projs, _ := store.GetConfig(ctx, "jira.projects")
if strings.TrimSpace(proj) == "" && strings.TrimSpace(projs) == "" {
    return errors.New(`no Jira project configured: bd config set jira.project "PROJ"`)
}

Try / catch

if err := runJiraPush(cmd, args); err != nil {
    if strings.Contains(err.Error(), "no Jira project configured") {
        fmt.Fprintln(os.Stderr, "Set jira.project or jira.projects before syncing")
        os.Exit(1)
    }
    return err
}

Prevention

When it happens

Trigger: Running `bd jira sync|push|pull` when both jira.project and jira.projects config keys are empty/unset, so ResolveProjectIDs yields zero keys.

Common situations: 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.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/f0e43d0b474cb649. Report an issue: GitHub.