Skip to content

Commit 61b33e5

Browse files
waleedlatif1claude
andauthored
fix(blocks): correct required field validation for Jira and Confluence 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>
1 parent 29fbad2 commit 61b33e5

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

apps/docs/content/docs/en/tools/jira.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ Update a Jira issue
251251
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
252252
| `issueKey` | string | Yes | Jira issue key to update \(e.g., PROJ-123\) |
253253
| `summary` | string | No | New summary for the issue |
254-
| `description` | string | No | New description for the issue |
254+
| `description` | string | No | New description for the issue. Accepts plain text \(auto-wrapped in ADF\) or a raw ADF document object |
255255
| `priority` | string | No | New priority ID or name for the issue \(e.g., "High"\) |
256256
| `assignee` | string | No | New assignee account ID for the issue |
257257
| `labels` | json | No | Labels to set on the issue \(array of label name strings\) |
@@ -284,7 +284,7 @@ Create a new Jira issue
284284
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
285285
| `projectId` | string | Yes | Jira project key \(e.g., PROJ\) |
286286
| `summary` | string | Yes | Summary for the issue |
287-
| `description` | string | No | Description for the issue |
287+
| `description` | string | No | Description for the issue. Accepts plain text \(auto-wrapped in ADF\) or a raw ADF document object |
288288
| `priority` | string | No | Priority ID or name for the issue \(e.g., "10000" or "High"\) |
289289
| `assignee` | string | No | Assignee account ID for the issue |
290290
| `cloudId` | string | No | Jira Cloud ID for the instance. If not provided, it will be fetched using the domain. |

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', 'create_blogpost'] },
779783
condition: {
780784
field: 'operation',
781785
value: ['create', 'update', 'create_blogpost', 'update_blogpost'],

apps/sim/blocks/blocks/jira.ts

Lines changed: 3 additions & 14 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,9 +218,8 @@ 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',
223-
dependsOn: ['projectId'],
224223
condition: { field: 'operation', value: ['update', 'write'] },
225224
wandConfig: {
226225
enabled: true,
@@ -240,7 +239,6 @@ Return ONLY the summary text - no explanations.`,
240239
title: 'New Description',
241240
type: 'long-input',
242241
placeholder: 'Enter new description for the issue',
243-
dependsOn: ['projectId'],
244242
condition: { field: 'operation', value: ['update', 'write'] },
245243
wandConfig: {
246244
enabled: true,
@@ -279,31 +277,27 @@ Return ONLY the description text - no explanations.`,
279277
title: 'Assignee Account ID',
280278
type: 'short-input',
281279
placeholder: 'Assignee account ID (e.g., 5b109f2e9729b51b54dc274d)',
282-
dependsOn: ['projectId'],
283280
condition: { field: 'operation', value: ['write', 'update'] },
284281
},
285282
{
286283
id: 'priority',
287284
title: 'Priority',
288285
type: 'short-input',
289286
placeholder: 'Priority ID or name (e.g., "10000" or "High")',
290-
dependsOn: ['projectId'],
291287
condition: { field: 'operation', value: ['write', 'update'] },
292288
},
293289
{
294290
id: 'labels',
295291
title: 'Labels',
296292
type: 'short-input',
297293
placeholder: 'Comma-separated labels (e.g., bug, urgent)',
298-
dependsOn: ['projectId'],
299294
condition: { field: 'operation', value: ['write', 'update'] },
300295
},
301296
{
302297
id: 'duedate',
303298
title: 'Due Date',
304299
type: 'short-input',
305300
placeholder: 'YYYY-MM-DD (e.g., 2024-12-31)',
306-
dependsOn: ['projectId'],
307301
condition: { field: 'operation', value: ['write', 'update'] },
308302
wandConfig: {
309303
enabled: true,
@@ -332,39 +326,34 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
332326
title: 'Environment',
333327
type: 'long-input',
334328
placeholder: 'Environment information (e.g., Production, Staging)',
335-
dependsOn: ['projectId'],
336329
condition: { field: 'operation', value: ['write', 'update'] },
337330
},
338331
{
339332
id: 'customFieldId',
340333
title: 'Custom Field ID',
341334
type: 'short-input',
342335
placeholder: 'e.g., customfield_10001 or 10001',
343-
dependsOn: ['projectId'],
344336
condition: { field: 'operation', value: ['write', 'update'] },
345337
},
346338
{
347339
id: 'customFieldValue',
348340
title: 'Custom Field Value',
349341
type: 'short-input',
350342
placeholder: 'Value for the custom field',
351-
dependsOn: ['projectId'],
352343
condition: { field: 'operation', value: ['write', 'update'] },
353344
},
354345
{
355346
id: 'components',
356347
title: 'Components',
357348
type: 'short-input',
358349
placeholder: 'Comma-separated component names',
359-
dependsOn: ['projectId'],
360350
condition: { field: 'operation', value: ['write', 'update'] },
361351
},
362352
{
363353
id: 'fixVersions',
364354
title: 'Fix Versions',
365355
type: 'short-input',
366356
placeholder: 'Comma-separated fix version names',
367-
dependsOn: ['projectId'],
368357
condition: { field: 'operation', value: ['write', 'update'] },
369358
},
370359
{

0 commit comments

Comments
 (0)