Skip to content

Commit f141019

Browse files
waleedlatif1claude
andcommitted
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>
1 parent 29fbad2 commit f141019

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

apps/sim/blocks/blocks/confluence.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,15 @@ export const ConfluenceBlock: BlockConfig<ConfluenceResponse> = {
128128
title: 'Title',
129129
type: 'short-input',
130130
placeholder: 'Enter title for the page',
131+
required: { field: 'operation', value: 'create' },
131132
condition: { field: 'operation', value: ['create', 'update'] },
132133
},
133134
{
134135
id: 'content',
135136
title: 'Content',
136137
type: 'long-input',
137138
placeholder: 'Enter content for the page',
139+
required: { field: 'operation', value: 'create' },
138140
condition: { field: 'operation', value: ['create', 'update'] },
139141
},
140142
{
@@ -766,6 +768,7 @@ export const ConfluenceV2Block: BlockConfig<ConfluenceResponse> = {
766768
title: 'Title',
767769
type: 'short-input',
768770
placeholder: 'Enter title',
771+
required: { field: 'operation', value: ['create', 'create_blogpost'] },
769772
condition: {
770773
field: 'operation',
771774
value: ['create', 'update', 'create_blogpost', 'update_blogpost', 'update_space'],
@@ -776,6 +779,7 @@ export const ConfluenceV2Block: BlockConfig<ConfluenceResponse> = {
776779
title: 'Content',
777780
type: 'long-input',
778781
placeholder: 'Enter content',
782+
required: { field: 'operation', value: 'create' },
779783
condition: {
780784
field: 'operation',
781785
value: ['create', 'update', 'create_blogpost', 'update_blogpost'],

apps/sim/blocks/blocks/jira.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const JiraBlock: BlockConfig<JiraResponse> = {
9191
placeholder: 'Select Jira project',
9292
dependsOn: ['credential', 'domain'],
9393
mode: 'basic',
94-
required: { field: 'operation', value: ['write', 'update', 'read-bulk'] },
94+
required: { field: 'operation', value: ['write', 'read-bulk'] },
9595
},
9696
// Manual project ID input (advanced mode)
9797
{
@@ -102,7 +102,7 @@ export const JiraBlock: BlockConfig<JiraResponse> = {
102102
placeholder: 'Enter Jira project ID',
103103
dependsOn: ['credential', 'domain'],
104104
mode: 'advanced',
105-
required: { field: 'operation', value: ['write', 'update', 'read-bulk'] },
105+
required: { field: 'operation', value: ['write', 'read-bulk'] },
106106
},
107107
// Issue selector (basic mode)
108108
{
@@ -218,7 +218,7 @@ export const JiraBlock: BlockConfig<JiraResponse> = {
218218
id: 'summary',
219219
title: 'New Summary',
220220
type: 'short-input',
221-
required: true,
221+
required: { field: 'operation', value: 'write' },
222222
placeholder: 'Enter new summary for the issue',
223223
dependsOn: ['projectId'],
224224
condition: { field: 'operation', value: ['update', 'write'] },

0 commit comments

Comments
 (0)