Skip to content

fix(blocks): correct required field validation for Jira and Confluence blocks#4172

Merged
waleedlatif1 merged 3 commits intostagingfrom
waleedlatif1/san-juan-v6
Apr 15, 2026
Merged

fix(blocks): correct required field validation for Jira and Confluence blocks#4172
waleedlatif1 merged 3 commits intostagingfrom
waleedlatif1/san-juan-v6

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

@waleedlatif1 waleedlatif1 commented Apr 15, 2026

Summary

  • Jira block: summary is now only required for create issue (not update — partial updates are supported). projectId is no longer required for update (API uses issueKey in the URL path, and the update tool doesn't even accept projectId).
  • Confluence block (both Legacy and V2): title and content are now required for page creation (backend rejects without them). title is also required for blog post creation in V2.
  • All changes verified against the Atlassian REST API docs and our backend route validation.

Test plan

  • Jira: Create issue — verify summary shows as required
  • Jira: Update issue — verify summary is optional, projectId is optional
  • Confluence: Create page — verify title and content show as required
  • Confluence V2: Create blog post — verify title shows as required
  • Confluence: Update page — verify title and content remain optional

…e blocks

Jira: summary is only required for create (not update), projectId is not required for update (API uses issueKey). Confluence: title and content are required for page creation, title is required for blog post creation — all enforced by backend validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 15, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Apr 15, 2026 3:23am

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 15, 2026

PR Summary

Low Risk
Low risk UI/validation-only changes, but could affect existing workflows by changing which fields are enforced for Jira/Confluence create vs update operations.

Overview
Aligns block input validation with Atlassian API behavior: Jira no longer requires projectId or summary for update (supporting partial updates), while Confluence (Legacy and V2) now requires title and content for page creation (and title/content for V2 blog post creation).

Updates the Jira docs to clarify that description accepts plain text (auto-wrapped to ADF) or a raw ADF document object for both jira_write and jira_update.

Reviewed by Cursor Bugbot for commit 57e3449. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 15, 2026

Greptile Summary

This PR fixes required-field validation mismatches in the Jira and Confluence block configs. In Jira, summary is now conditionally required (create only) and projectId is no longer required for update operations (the update tool routes on issueKey in the URL path). In Confluence (Legacy and V2), title and content are now correctly required for page/blog-post creation operations.

Confidence Score: 5/5

Safe to merge — all required-field changes match documented Atlassian API contracts.

All three files contain targeted, correct changes with no logic bugs, no new dependencies, and no broken contracts. The required condition syntax is consistent with existing patterns in the codebase, and the dependsOn removals are safe since those fields no longer need to clear on project change for update operations.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/jira.ts Correctly narrows projectId required to create/read-bulk only, makes summary conditionally required for write, and removes stale dependsOn: ['projectId'] from fields unrelated to project selection.
apps/sim/blocks/blocks/confluence.ts Adds correct conditional required to title and content for create operations in both Legacy and V2 blocks; update operations remain optional (partial updates).
apps/docs/content/docs/en/tools/jira.mdx Documentation-only update adding ADF format hint to the description field for both create and update operations.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Jira["Jira Block"]
        JOp{operation?}
        JOp -->|write / create| JReqAll["projectId required\nsummary required"]
        JOp -->|update| JReqPartial["projectId not required\nsummary not required\nissueKey required"]
        JOp -->|read-bulk| JReqBulk["projectId required"]
    end

    subgraph ConfLegacy["Confluence Legacy Block"]
        COp{operation?}
        COp -->|create| CReqCreate["title required\ncontent required"]
        COp -->|update| CReqUpdate["title not required\ncontent not required"]
    end

    subgraph ConfV2["Confluence V2 Block"]
        CV2Op{operation?}
        CV2Op -->|create| CV2ReqCreate["title required\ncontent required"]
        CV2Op -->|create_blogpost| CV2ReqBlog["title required\ncontent required"]
        CV2Op -->|update / update_blogpost| CV2ReqUpdate["title not required\ncontent not required"]
    end
Loading

Reviews (2): Last reviewed commit: "lint" | Re-trigger Greptile

…re content for blog post creation

Jira: Remove dependsOn projectId from shared write/update fields — projectId is not required for update so the gate would disable all update fields when no project is selected. Write-only fields (issueType, parentIssue, reporter) retain the gate since projectId is required for create.

Confluence V2: Add create_blogpost to content required condition — backend Zod schema enforces content for blog post creation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 57e3449. Configure here.

@waleedlatif1 waleedlatif1 merged commit 61b33e5 into staging Apr 15, 2026
14 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/san-juan-v6 branch April 15, 2026 06:40
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