Skip to content

Conversation

@dc-larsen
Copy link
Contributor

Summary

Fixes two bugs preventing Jira settings configured in the Socket dashboard from being used by the Jira notifier:

  • Parameter name mismatch: Dashboard API returns jiraUrl (normalized to jira_url), but notifications.yaml defined the param as name: server. The manager looks up params by name, so jira_url was never found.
  • Priority bug in param resolution: The code would set val from app_config, then overwrite it with p_default if the env var wasn't set, despite the comment saying app_config should have highest priority.

Customer Impact

A customer reported that Jira integration configured via the dashboard wasn't working. Logs showed:

Loaded notifier: jira - enabled via app_config:jira_url
JiraNotifier: exception searching for existing issue: Invalid URL '/rest/api/3/search/jql': No scheme supplied.

The notifier was enabled (because the manager saw jira_url in app_config), but the actual URL value wasn't passed through.

Changes

  • notifications.yaml: Renamed Jira params from server/project to jira_url/jira_project to match dashboard config keys
  • manager.py: Fixed param resolution order (default → env var → app_config, with app_config having highest priority)
  • jira_notifier.py: Updated to look for the correct param names with fallback to auth dict for backwards compatibility

Test plan

  • Created test script to reproduce the bug (Jira URL from app_config not reaching notifier)
  • Verified fix locally - all four Jira params (jira_url, jira_project, jira_email, jira_api_token) now resolve correctly from simulated dashboard config
  • Manual test with actual dashboard configuration

🤖 Generated with Claude Code

Two bugs were preventing Jira settings configured in the Socket dashboard
from being used by the Jira notifier:

1. Parameter name mismatch in notifications.yaml
   - Dashboard API returns `jiraUrl` -> normalized to `jira_url`
   - But notifications.yaml defined param as `name: server`
   - Manager looks up params by name, so `jira_url` was never found
   - Fixed by renaming params to match dashboard keys: `jira_url`, `jira_project`

2. Priority bug in manager param resolution
   - Comment said "app_config -> env var -> default" (app_config highest)
   - But code would set val from app_config, then overwrite with default
     if env var wasn't set
   - Fixed by restructuring: start with default, apply env var, then app_config

Also updated jira_notifier.py to look for the correct param names
(`jira_url`, `jira_project`, `jira_email`, `jira_api_token`) and fall back
to the `auth` dict for backwards compatibility.

Tested locally with simulated dashboard config - all four Jira params now
resolve correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dc-larsen dc-larsen requested a review from a team as a code owner January 23, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants