Skip to content

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

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

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

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

@waleedlatif1 waleedlatif1 commented Apr 14, 2026

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
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 14, 2026 1:49am

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 14, 2026

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.

@waleedlatif1 waleedlatif1 changed the title feat(jsm): add all Forms API endpoints for two-step form workflow feat(jsm): add all Forms API endpoints for jira Apr 14, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 14, 2026

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

Filename Overview
apps/sim/app/api/tools/jsm/forms/copy/route.ts Copy-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.ts Submit route uses text-then-conditional-parse pattern to safely handle 204 No Content.
apps/sim/app/api/tools/jsm/forms/save/route.ts PUT-based save-answers route; validates answers type including array guard added in prior fix.
apps/sim/blocks/blocks/jira_service_management.ts Block config adds 10 new form operations with correct subBlocks, conditions, and params mappings.
apps/sim/tools/jsm/types.ts All 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

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@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 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.

@waleedlatif1 waleedlatif1 merged commit 6ce299b into staging Apr 14, 2026
14 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/san-juan-v4 branch April 14, 2026 02:03
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.

1 participant