Skip to content

Commit

Permalink
fix: send group_id as string in monday destination
Browse files Browse the repository at this point in the history
  • Loading branch information
aashishmalik committed Apr 16, 2024
1 parent 1697641 commit 4952bd2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/v0/destinations/monday/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ const populatePayload = (message, Config, boardDeatailsResponse) => {
throw new InstrumentationError('Item name is required to create an item');
}
const groupId = getGroupId(groupTitle, boardDeatailsResponse.response?.data);
payload.query = `mutation { create_item (board_id: ${boardId}, group_id: ${JSON.stringify(groupId)} item_name: ${JSON.stringify(
payload.query = `mutation { create_item (board_id: ${boardId}, group_id: ${JSON.stringify(groupId)}, item_name: ${JSON.stringify(
message.properties?.name,
)}, column_values: ${JSON.stringify(columnValues)}) {id}}`;
} else {
Expand Down
4 changes: 2 additions & 2 deletions test/integrations/destinations/monday/processor/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ export const data = [
body: {
JSON: {
query:
'mutation { create_item (board_id: 339283933, group_id: "group_title" item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"[email protected]\\",\\"text\\":\\"emailId\\"}}") {id}}',
'mutation { create_item (board_id: 339283933, group_id: "group_title", item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"[email protected]\\",\\"text\\":\\"emailId\\"}}") {id}}',
},
JSON_ARRAY: {},
XML: {},
Expand Down Expand Up @@ -1188,7 +1188,7 @@ export const data = [
body: {
JSON: {
query:
'mutation { create_item (board_id: 339283933, group_id: "group_title" item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"[email protected]\\",\\"text\\":\\"emailId\\"},\\"checkbox\\":{\\"checked\\":true},\\"numbers\\":\\"45\\",\\"text\\":\\"texting\\",\\"country\\":{\\"countryName\\":\\"Unites States\\",\\"countryCode\\":\\"US\\"},\\"location\\":{\\"address\\":\\"New York\\",\\"lat\\":\\"51.23\\",\\"lng\\":\\"35.3\\"},\\"phone\\":{\\"phone\\":\\"2626277272\\",\\"countryShortName\\":\\"US\\"},\\"rating\\":3,\\"link\\":{\\"url\\":\\"demo.com\\",\\"text\\":\\"websiteLink\\"},\\"long_text\\":{\\"text\\":\\"property description\\"},\\"world_clock\\":{\\"timezone\\":\\"America/New_York\\"}}") {id}}',
'mutation { create_item (board_id: 339283933, group_id: "group_title", item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"[email protected]\\",\\"text\\":\\"emailId\\"},\\"checkbox\\":{\\"checked\\":true},\\"numbers\\":\\"45\\",\\"text\\":\\"texting\\",\\"country\\":{\\"countryName\\":\\"Unites States\\",\\"countryCode\\":\\"US\\"},\\"location\\":{\\"address\\":\\"New York\\",\\"lat\\":\\"51.23\\",\\"lng\\":\\"35.3\\"},\\"phone\\":{\\"phone\\":\\"2626277272\\",\\"countryShortName\\":\\"US\\"},\\"rating\\":3,\\"link\\":{\\"url\\":\\"demo.com\\",\\"text\\":\\"websiteLink\\"},\\"long_text\\":{\\"text\\":\\"property description\\"},\\"world_clock\\":{\\"timezone\\":\\"America/New_York\\"}}") {id}}',
},
JSON_ARRAY: {},
XML: {},
Expand Down
2 changes: 1 addition & 1 deletion test/integrations/destinations/monday/router/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const data = [
body: {
JSON: {
query:
'mutation { create_item (board_id: 339283933, group_id: "group_title" item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"[email protected]\\",\\"text\\":\\"emailId\\"}}") {id}}',
'mutation { create_item (board_id: 339283933, group_id: "group_title", item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"[email protected]\\",\\"text\\":\\"emailId\\"}}") {id}}',
},
JSON_ARRAY: {},
XML: {},
Expand Down

0 comments on commit 4952bd2

Please sign in to comment.