Skip to content

feat(jsm): add all Forms API endpoints for jira - #4142

Merged
waleedlatif1 merged 5 commits into
stagingfrom
waleedlatif1/san-juan-v4
Apr 14, 2026
Merged

feat(jsm): add all Forms API endpoints for jira#4142
waleedlatif1 merged 5 commits into
stagingfrom
waleedlatif1/san-juan-v4

Conversation

@waleedlatif1

@waleedlatif1waleedlatif1 commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add 10 new JSM Forms API endpoints: attach form, save answers, submit, get form, get answers, reopen, delete, externalise, internalise, copy forms
  • All endpoints verified against Atlassian Forms OpenAPI spec with OAuth-compatible URL structure (/ex/jira/{cloudId}/forms/)
  • No additional OAuth scopes needed

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercelBot commented Apr 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
docsSkippedSkippedApr 14, 2026 1:49am

Request Review

@cursor

cursorBot commented Apr 14, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Adds 10 new JSM Forms operations (attach/save/submit/get/answers/reopen/delete/visibility/copy) exposed via internal API routes and tool registry, which increases integration surface area and relies on correct Atlassian API semantics/error handling. Changes are mostly additive but touch request validation and tool wiring used by runtime tool execution.

Overview
Adds 10 new Jira Service Management Forms tools to manage forms on issues/requests: attach templates, save answers, submit/reopen, fetch full form or simplified answers, delete forms, toggle internal/external visibility, and copy forms between issues.

Implements corresponding Next.js API routes under api/tools/jsm/forms/* with internal auth, input validation, cloudId discovery, and consistent Atlassian error parsing, and wires the new tools into the JSM block selector, tool registry, integration metadata (operationCount update), and docs.

Reviewed by Cursor Bugbot for commit 3bf9337. Configure here.

@waleedlatif1waleedlatif1 changed the title feat(jsm): add all Forms API endpoints for two-step form workflowfeat(jsm): add all Forms API endpoints for jiraApr 14, 2026
@greptile-apps

greptile-appsBot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds 10 new JSM Forms API endpoints (attach, save answers, submit, get form, get answers, reopen, delete, externalise, internalise, copy), wiring each through a new Next.js route, a tool config, updated block subBlocks, and extended types. Previous review concerns (204 No Content handling on action endpoints, array rejection for answers, and formIds array validation) have all been addressed in follow-up commits.

Confidence Score: 5/5

Safe to merge; the only remaining finding is a minor validation-ordering style issue in the copy route.

All P0/P1 issues from prior review rounds have been resolved. The one remaining comment is a P2 quality improvement with no correctness impact.

apps/sim/app/api/tools/jsm/forms/copy/route.ts — minor validation ordering improvement

Important Files Changed

FilenameOverview
apps/sim/app/api/tools/jsm/forms/copy/route.tsCopy-forms route; formIds array validation happens after the getJiraCloudId() network call, causing a wasted round-trip on invalid input.
apps/sim/app/api/tools/jsm/forms/submit/route.tsSubmit route uses text-then-conditional-parse pattern to safely handle 204 No Content.
apps/sim/app/api/tools/jsm/forms/save/route.tsPUT-based save-answers route; validates answers type including array guard added in prior fix.
apps/sim/blocks/blocks/jira_service_management.tsBlock config adds 10 new form operations with correct subBlocks, conditions, and params mappings.
apps/sim/tools/jsm/types.tsAll new Params/Response interfaces added for 10 endpoints; union type extended correctly.

Reviews (4): Last reviewed commit: "fix(jsm): add formTemplateId validation ..." | Re-trigger Greptile

Comment threadapps/sim/app/api/tools/jsm/forms/submit/route.ts Outdated
Comment threadapps/sim/app/api/tools/jsm/forms/save/route.ts
Comment threadapps/sim/app/api/tools/jsm/forms/save/route.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

Comment threadapps/sim/app/api/tools/jsm/forms/copy/route.ts
@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

Comment threadapps/sim/blocks/blocks/jira_service_management.ts
Comment threadapps/sim/app/api/tools/jsm/forms/attach/route.ts
@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot left a comment

Copy link
Copy Markdown

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 1 potential issue.

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 3bf9337. Configure here.

Comment threadapps/sim/blocks/blocks/jira_service_management.ts
@waleedlatif1
waleedlatif1 merged commit 6ce299b into stagingApr 14, 2026
14 checks passed
@waleedlatif1
waleedlatif1 deleted the waleedlatif1/san-juan-v4 branch April 14, 2026 02:03
Sign up for freeto 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.

1 participant

@waleedlatif1