Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(blocks): correct required field validation for Jira and Confluenc…
…e blocks (#4172)

* fix(blocks): correct required field validation for Jira and Confluence 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>

* fix(blocks): remove projectId dependsOn gate for update fields, require 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>

* lint

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
  • Loading branch information
waleedlatif1 and claude authored Apr 15, 2026
commit 61b33e5978038c73bee28d2fc63ab524d4d6d0b9
4 changes: 2 additions & 2 deletions apps/docs/content/docs/en/tools/jira.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ Update a Jira issue
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
| `issueKey` | string | Yes | Jira issue key to update \(e.g., PROJ-123\) |
| `summary` | string | No | New summary for the issue |
| `description` | string | No | New description for the issue |
| `description` | string | No | New description for the issue. Accepts plain text \(auto-wrapped in ADF\) or a raw ADF document object |
| `priority` | string | No | New priority ID or name for the issue \(e.g., "High"\) |
| `assignee` | string | No | New assignee account ID for the issue |
| `labels` | json | No | Labels to set on the issue \(array of label name strings\) |
Expand Down Expand Up @@ -284,7 +284,7 @@ Create a new Jira issue
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
| `projectId` | string | Yes | Jira project key \(e.g., PROJ\) |
| `summary` | string | Yes | Summary for the issue |
| `description` | string | No | Description for the issue |
| `description` | string | No | Description for the issue. Accepts plain text \(auto-wrapped in ADF\) or a raw ADF document object |
| `priority` | string | No | Priority ID or name for the issue \(e.g., "10000" or "High"\) |
| `assignee` | string | No | Assignee account ID for the issue |
| `cloudId` | string | No | Jira Cloud ID for the instance. If not provided, it will be fetched using the domain. |
Expand Down
4 changes: 4 additions & 0 deletions apps/sim/blocks/blocks/confluence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,15 @@ export const ConfluenceBlock: BlockConfig<ConfluenceResponse> = {
title: 'Title',
type: 'short-input',
placeholder: 'Enter title for the page',
required: { field: 'operation', value: 'create' },
condition: { field: 'operation', value: ['create', 'update'] },
},
{
id: 'content',
title: 'Content',
type: 'long-input',
placeholder: 'Enter content for the page',
required: { field: 'operation', value: 'create' },
condition: { field: 'operation', value: ['create', 'update'] },
},
{
Expand Down Expand Up @@ -766,6 +768,7 @@ export const ConfluenceV2Block: BlockConfig<ConfluenceResponse> = {
title: 'Title',
type: 'short-input',
placeholder: 'Enter title',
required: { field: 'operation', value: ['create', 'create_blogpost'] },
condition: {
field: 'operation',
value: ['create', 'update', 'create_blogpost', 'update_blogpost', 'update_space'],
Expand All @@ -776,6 +779,7 @@ export const ConfluenceV2Block: BlockConfig<ConfluenceResponse> = {
title: 'Content',
type: 'long-input',
placeholder: 'Enter content',
required: { field: 'operation', value: ['create', 'create_blogpost'] },
condition: {
field: 'operation',
value: ['create', 'update', 'create_blogpost', 'update_blogpost'],
Expand Down
17 changes: 3 additions & 14 deletions apps/sim/blocks/blocks/jira.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const JiraBlock: BlockConfig<JiraResponse> = {
placeholder: 'Select Jira project',
dependsOn: ['credential', 'domain'],
mode: 'basic',
required: { field: 'operation', value: ['write', 'update', 'read-bulk'] },
required: { field: 'operation', value: ['write', 'read-bulk'] },
},
// Manual project ID input (advanced mode)
{
Expand All @@ -102,7 +102,7 @@ export const JiraBlock: BlockConfig<JiraResponse> = {
placeholder: 'Enter Jira project ID',
dependsOn: ['credential', 'domain'],
mode: 'advanced',
required: { field: 'operation', value: ['write', 'update', 'read-bulk'] },
required: { field: 'operation', value: ['write', 'read-bulk'] },
},
// Issue selector (basic mode)
{
Expand Down Expand Up @@ -218,9 +218,8 @@ export const JiraBlock: BlockConfig<JiraResponse> = {
id: 'summary',
title: 'New Summary',
type: 'short-input',
required: true,
required: { field: 'operation', value: 'write' },
placeholder: 'Enter new summary for the issue',
dependsOn: ['projectId'],
condition: { field: 'operation', value: ['update', 'write'] },
wandConfig: {
enabled: true,
Expand All @@ -240,7 +239,6 @@ Return ONLY the summary text - no explanations.`,
title: 'New Description',
type: 'long-input',
placeholder: 'Enter new description for the issue',
dependsOn: ['projectId'],
condition: { field: 'operation', value: ['update', 'write'] },
wandConfig: {
enabled: true,
Expand Down Expand Up @@ -279,31 +277,27 @@ Return ONLY the description text - no explanations.`,
title: 'Assignee Account ID',
type: 'short-input',
placeholder: 'Assignee account ID (e.g., 5b109f2e9729b51b54dc274d)',
dependsOn: ['projectId'],
condition: { field: 'operation', value: ['write', 'update'] },
},
{
id: 'priority',
title: 'Priority',
type: 'short-input',
placeholder: 'Priority ID or name (e.g., "10000" or "High")',
dependsOn: ['projectId'],
condition: { field: 'operation', value: ['write', 'update'] },
},
{
id: 'labels',
title: 'Labels',
type: 'short-input',
placeholder: 'Comma-separated labels (e.g., bug, urgent)',
dependsOn: ['projectId'],
condition: { field: 'operation', value: ['write', 'update'] },
},
{
id: 'duedate',
title: 'Due Date',
type: 'short-input',
placeholder: 'YYYY-MM-DD (e.g., 2024-12-31)',
dependsOn: ['projectId'],
condition: { field: 'operation', value: ['write', 'update'] },
wandConfig: {
enabled: true,
Expand Down Expand Up @@ -332,39 +326,34 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
title: 'Environment',
type: 'long-input',
placeholder: 'Environment information (e.g., Production, Staging)',
dependsOn: ['projectId'],
condition: { field: 'operation', value: ['write', 'update'] },
},
{
id: 'customFieldId',
title: 'Custom Field ID',
type: 'short-input',
placeholder: 'e.g., customfield_10001 or 10001',
dependsOn: ['projectId'],
condition: { field: 'operation', value: ['write', 'update'] },
},
{
id: 'customFieldValue',
title: 'Custom Field Value',
type: 'short-input',
placeholder: 'Value for the custom field',
dependsOn: ['projectId'],
condition: { field: 'operation', value: ['write', 'update'] },
},
{
id: 'components',
title: 'Components',
type: 'short-input',
placeholder: 'Comma-separated component names',
dependsOn: ['projectId'],
condition: { field: 'operation', value: ['write', 'update'] },
},
{
id: 'fixVersions',
title: 'Fix Versions',
type: 'short-input',
placeholder: 'Comma-separated fix version names',
dependsOn: ['projectId'],
condition: { field: 'operation', value: ['write', 'update'] },
},
{
Expand Down
Loading