Skip to content

feat: add Jira heartbeat management components#4888

Open
felixgateru wants to merge 1 commit into
superplanehq:mainfrom
felixgateru:feat/jsm-heartbeats
Open

feat: add Jira heartbeat management components#4888
felixgateru wants to merge 1 commit into
superplanehq:mainfrom
felixgateru:feat/jsm-heartbeats

Conversation

@felixgateru
Copy link
Copy Markdown
Collaborator

@felixgateru felixgateru commented May 19, 2026

Resolves #4893

What changed

Adds four Jira Service Management (JSM) Operations workflow components:

  • Create Heartbeat — register a new heartbeat monitor (interval, alerts, etc.)
  • Ping Heartbeat — report liveness for an existing heartbeat
  • Update Heartbeat — change heartbeat settings (optional fields via toggles)
  • Delete Heartbeat — remove a heartbeat from a team

Why

Enable Superplane workflow to manage Jira Heartbeats that detects when scheduled jobs, cron tasks, or automated systems stop reporting in. If a heartbeat is not pinged within its expected interval, Jira Service Management raises an alert.

How

Backend:

Implemented new client methods in pkg/integrations/jira/client.go for heartbeat endpoints.
Registered actions in pkg/integrations/jira/jira.go and updated token permission guidance.
Added tests

Frontend:

Added Jira workflow v2 mappers
Registered mappers and event states in web_src/src/pages/workflowv2/mappers/jira/index.ts
Added mapper specs

@superplanehq-integration
Copy link
Copy Markdown

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

@felixgateru felixgateru force-pushed the feat/jsm-heartbeats branch from 6936224 to 70b9d85 Compare May 19, 2026 13:46
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
@felixgateru felixgateru force-pushed the feat/jsm-heartbeats branch from 70b9d85 to 1f4133d Compare May 19, 2026 14:09
@felixgateru felixgateru marked this pull request as ready for review May 19, 2026 14:09
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1f4133d. Configure here.

req := updateHeartbeatRequestFromSpec(spec)
if updateHeartbeatRequestEmpty(req) {
return fmt.Errorf("at least one update field must be enabled")
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update setup allows empty toggles

Medium Severity

Setup treats any enabled toggle as an update via hasAnyHeartbeatUpdate, but Execute builds the PATCH with updateHeartbeatRequestFromSpec and rejects when updateHeartbeatRequestEmpty (e.g. empty description, empty alert tags, or interval under 1). Nodes can save yet fail at run with "at least one update field must be enabled".

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1f4133d. Configure here.

Description: strings.TrimSpace(spec.Description),
Interval: spec.Interval,
IntervalUnit: strings.TrimSpace(spec.IntervalUnit),
Enabled: &enabled,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create sends disabled by default

Medium Severity

Execute always sets CreateHeartbeatRequest.Enabled from spec.Enabled, a plain bool that is false when the key is absent after decode. That can POST "enabled": false despite the field default of true, creating disabled heartbeats unless the UI always persists enabled.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1f4133d. Configure here.

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.

[Jira] add heartbeat management components

1 participant