Skip to content

Commit 8af6ca6

Browse files
committed
fix(atlassian): send Trello update ID lists comma-separated and tighten output types
PUT /cards/{id} documents idLabels/idMembers as comma-separated strings. Treat a whitespace-only Jira parent as unset, mark nullable Trello card outputs, document the new Trello types, and type the Confluence search test.
1 parent e17deb6 commit 8af6ca6

5 files changed

Lines changed: 38 additions & 10 deletions

File tree

‎apps/sim/blocks/blocks/jira.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,9 +1166,7 @@ Return ONLY the comment text - no explanations.`,
11661166
customFieldId: params.customFieldId || undefined,
11671167
customFieldValue: params.customFieldValue || undefined,
11681168
customFields: params.customFields || undefined,
1169-
parent: params.updateParentIssue
1170-
? String(params.updateParentIssue).trim()
1171-
: undefined,
1169+
parent: String(params.updateParentIssue ?? '').trim() || undefined,
11721170
notifyUsers:
11731171
params.notifyUsers === 'false'
11741172
? false

‎apps/sim/lib/internal/confluence/operations.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ describe('Confluence operations', () => {
179179
})
180180

181181
it('keeps a trailing CQL order by after the parenthesized filter', async () => {
182-
const fetchMock = vi.fn(async () => Response.json({ results: [], totalSize: 0, _links: {} }))
182+
const fetchMock = vi.fn<typeof fetch>(async () =>
183+
Response.json({ results: [], totalSize: 0, _links: {} })
184+
)
183185
vi.stubGlobal('fetch', fetchMock)
184186

185187
await executeConfluenceSearch(

‎apps/sim/tools/generated/tool-outputs.ts‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎apps/sim/tools/trello/types.ts‎

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export interface TrelloList {
3737
idBoard: string
3838
}
3939

40+
/** Badge counts Trello shows on the card front; each field is null when Trello omits it. */
4041
export interface TrelloCardBadges {
4142
votes: number | null
4243
comments: number | null
@@ -51,6 +52,7 @@ export interface TrelloCardBadges {
5152
dueComplete: boolean | null
5253
}
5354

55+
/** One checklist item; optional fields are null when Trello omits them. */
5456
export interface TrelloCardCheckItem {
5557
id: string
5658
name: string
@@ -61,6 +63,7 @@ export interface TrelloCardCheckItem {
6163
idMember: string | null
6264
}
6365

66+
/** A card checklist with its items, returned only when checklists are requested. */
6467
export interface TrelloCardChecklist {
6568
id: string
6669
name: string
@@ -70,6 +73,7 @@ export interface TrelloCardChecklist {
7073
checkItems: TrelloCardCheckItem[]
7174
}
7275

76+
/** A card attachment, returned only when attachments are requested; metadata fields may be null. */
7377
export interface TrelloCardAttachment {
7478
id: string
7579
name: string | null
@@ -497,6 +501,7 @@ export const TRELLO_CARD_OUTPUT_PROPERTIES: Record<string, OutputProperty> = {
497501
type: 'string',
498502
description: 'Label color',
499503
optional: true,
504+
nullable: true,
500505
},
501506
},
502507
},
@@ -505,6 +510,7 @@ export const TRELLO_CARD_OUTPUT_PROPERTIES: Record<string, OutputProperty> = {
505510
type: 'string',
506511
description: 'Card due date in ISO 8601 format',
507512
optional: true,
513+
nullable: true,
508514
},
509515
dueComplete: {
510516
type: 'boolean',
@@ -515,14 +521,31 @@ export const TRELLO_CARD_OUTPUT_PROPERTIES: Record<string, OutputProperty> = {
515521
type: 'string',
516522
description: 'Card start date in ISO 8601 format',
517523
optional: true,
524+
nullable: true,
525+
},
526+
pos: {
527+
type: 'number',
528+
description: 'Position of the card in its list',
529+
optional: true,
530+
nullable: true,
531+
},
532+
shortUrl: {
533+
type: 'string',
534+
description: 'Short card URL without the name slug',
535+
optional: true,
536+
nullable: true,
537+
},
538+
shortLink: {
539+
type: 'string',
540+
description: '8-character short card ID',
541+
optional: true,
542+
nullable: true,
518543
},
519-
pos: { type: 'number', description: 'Position of the card in its list', optional: true },
520-
shortUrl: { type: 'string', description: 'Short card URL without the name slug', optional: true },
521-
shortLink: { type: 'string', description: '8-character short card ID', optional: true },
522544
idShort: {
523545
type: 'number',
524546
description: 'Board-specific numeric card ID (can change when the card moves)',
525547
optional: true,
548+
nullable: true,
526549
},
527550
idMembers: {
528551
type: 'array',
@@ -538,11 +561,13 @@ export const TRELLO_CARD_OUTPUT_PROPERTIES: Record<string, OutputProperty> = {
538561
type: 'string',
539562
description: 'When the card last had activity (ISO 8601)',
540563
optional: true,
564+
nullable: true,
541565
},
542566
badges: {
543567
type: 'object',
544568
description: 'Card badge counts shown on the front of the card',
545569
optional: true,
570+
nullable: true,
546571
properties: {
547572
votes: { type: 'number', description: 'Vote count', optional: true },
548573
comments: { type: 'number', description: 'Comment count', optional: true },
@@ -577,6 +602,7 @@ export const TRELLO_CARD_OUTPUT_PROPERTIES: Record<string, OutputProperty> = {
577602
type: 'array',
578603
description: 'Checklists with their items. Only returned when checklists are requested',
579604
optional: true,
605+
nullable: true,
580606
items: {
581607
type: 'object',
582608
properties: {
@@ -612,6 +638,7 @@ export const TRELLO_CARD_OUTPUT_PROPERTIES: Record<string, OutputProperty> = {
612638
type: 'array',
613639
description: 'Card attachments. Only returned when attachments are requested',
614640
optional: true,
641+
nullable: true,
615642
items: {
616643
type: 'object',
617644
properties: {
@@ -639,6 +666,7 @@ export const TRELLO_CARD_OUTPUT_PROPERTIES: Record<string, OutputProperty> = {
639666
type: 'array',
640667
description: 'Member objects on the card. Only returned when members are requested',
641668
optional: true,
669+
nullable: true,
642670
items: {
643671
type: 'object',
644672
properties: {

‎apps/sim/tools/trello/update_card.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ export const trelloUpdateCardTool: ToolConfig<TrelloUpdateCardParams, TrelloUpda
148148
if (params.start !== undefined) body.start = params.start
149149
if (params.pos !== undefined) body.pos = params.pos
150150
if (params.idBoard !== undefined) body.idBoard = params.idBoard.trim()
151-
if (params.labelIds?.length) body.idLabels = params.labelIds
152-
if (params.memberIds?.length) body.idMembers = params.memberIds
151+
if (params.labelIds?.length) body.idLabels = params.labelIds.join(',')
152+
if (params.memberIds?.length) body.idMembers = params.memberIds.join(',')
153153

154154
if (Object.keys(body).length === 0) {
155155
throw new Error('At least one field must be provided to update')

0 commit comments

Comments
 (0)