From c3cb15e5ad86e38a7a44e949097bf7515281046f Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Wed, 5 Nov 2025 13:10:30 -0500 Subject: [PATCH 1/3] create-issue updates --- .../actions/create-issue/create-issue.mjs | 70 ++++++++++++------- components/jira/jira.app.mjs | 26 ++++--- components/jira/package.json | 2 +- 3 files changed, 63 insertions(+), 35 deletions(-) diff --git a/components/jira/actions/create-issue/create-issue.mjs b/components/jira/actions/create-issue/create-issue.mjs index dc53ea9aeb7b4..a8df5a2cbac1f 100644 --- a/components/jira/actions/create-issue/create-issue.mjs +++ b/components/jira/actions/create-issue/create-issue.mjs @@ -1,13 +1,14 @@ import constants from "../../common/constants.mjs"; import utils from "../../common/utils.mjs"; import common from "../common/issue.mjs"; +import { ConfigurationError } from "@pipedream/platform"; export default { ...common, key: "jira-create-issue", name: "Create Issue", - description: "Creates an issue or, where the option to create subtasks is enabled in Jira, a subtask. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-post)", - version: "0.1.25", + description: "Creates an issue or, where the option to create subtasks is enabled in Jira, a subtask. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post)", + version: "0.1.26", annotations: { destructiveHint: false, openWorldHint: true, @@ -45,39 +46,50 @@ export default { ], }, }, - async additionalProps() { + async additionalProps(existingProps) { const { cloudId, projectId, issueTypeId, } = this; - const { - projects: [ - { - issuetypes: [ - { fields = {} } = {}, - ], + if (isNaN(projectId) || !cloudId || !isNaN(issueTypeId)) { + existingProps.additionalProperties.optional = false; + return {}; + } + + try { + const { + projects: [ + { + issuetypes: [ + { fields = {} } = {}, + ], + }, + ], + } = await this.app.getCreateIssueMetadata({ + cloudId, + params: { + projectIds: projectId, + issuetypeIds: issueTypeId, + expand: "projects.issuetypes.fields", }, - ], - } = await this.app.getCreateIssueMetadata({ - cloudId, - params: { - projectIds: projectId, - issuetypeIds: issueTypeId, - expand: "projects.issuetypes.fields", - }, - }); + }); - const keys = [ - constants.FIELD_KEY.ISSUETYPE, - constants.FIELD_KEY.PROJECT, - ]; + const keys = [ + constants.FIELD_KEY.ISSUETYPE, + constants.FIELD_KEY.PROJECT, + ]; - return this.getDynamicFields({ - fields, - predicate: ({ key }) => !keys.includes(key), - }); + existingProps.additionalProperties.optional = true; + return this.getDynamicFields({ + fields, + predicate: ({ key }) => !keys.includes(key), + }); + } catch { + existingProps.additionalProperties.optional = false; + return {}; + } }, async run({ $ }) { const { @@ -94,6 +106,12 @@ export default { ...dynamicFields } = this; + if ((!dynamicFields || Object.keys(dynamicFields).length === 0) + && (!additionalProperties || Object.keys(additionalProperties).length === 0) + ) { + throw new ConfigurationError("Please provide at least one additional property"); + } + const fields = utils.reduceProperties({ initialProps: { project: { diff --git a/components/jira/jira.app.mjs b/components/jira/jira.app.mjs index 4fc72faec3a85..49d38ad879325 100644 --- a/components/jira/jira.app.mjs +++ b/components/jira/jira.app.mjs @@ -10,7 +10,7 @@ export default { cloudId: { type: "string", label: "Cloud ID", - description: "The cloud ID.", + description: "The cloud ID", useQuery: true, async options() { const clouds = await this.getClouds(); @@ -24,7 +24,7 @@ export default { projectID: { type: "string", label: "Project ID", - description: "The project ID.", + description: "The project ID", useQuery: true, async options({ prevContext, query, cloudId, @@ -60,12 +60,16 @@ export default { async options({ cloudId, projectId, }) { - const issueTypes = await this.getProjectIssueTypes({ - cloudId, - params: { - projectId, - }, - }); + const issueTypes = isNaN(projectId) + ? await this.getUserIssueTypes({ + cloudId, + }) + : await this.getProjectIssueTypes({ + cloudId, + params: { + projectId, + }, + }); return issueTypes.map(({ name: label, id: value, }) => ({ @@ -597,6 +601,12 @@ export default { ...args, }); }, + getUserIssueTypes(args = {}) { + return this._makeRequest({ + path: "/issuetype", + ...args, + }); + }, getWebhook(args = {}) { return this._makeRequest({ path: "/webhook", diff --git a/components/jira/package.json b/components/jira/package.json index 91cec0f206565..96fc46c1c7a02 100644 --- a/components/jira/package.json +++ b/components/jira/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/jira", - "version": "1.1.2", + "version": "1.1.3", "description": "Pipedream Jira Components", "main": "jira.app.mjs", "keywords": [ From c70e426e6150fbaacbd2a524d4015d2834409b7b Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Wed, 5 Nov 2025 13:13:56 -0500 Subject: [PATCH 2/3] versions --- .../actions/add-attachment-to-issue/add-attachment-to-issue.mjs | 2 +- .../jira/actions/add-comment-to-issue/add-comment-to-issue.mjs | 2 +- .../add-multiple-attachments-to-issue.mjs | 2 +- .../jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs | 2 +- components/jira/actions/assign-issue/assign-issue.mjs | 2 +- .../create-custom-field-options-context.mjs | 2 +- components/jira/actions/create-version/create-version.mjs | 2 +- components/jira/actions/delete-project/delete-project.mjs | 2 +- components/jira/actions/get-all-projects/get-all-projects.mjs | 2 +- components/jira/actions/get-issue/get-issue.mjs | 2 +- components/jira/actions/get-task/get-task.mjs | 2 +- components/jira/actions/get-transitions/get-transitions.mjs | 2 +- components/jira/actions/get-user/get-user.mjs | 2 +- components/jira/actions/get-users/get-users.mjs | 2 +- .../jira/actions/list-issue-comments/list-issue-comments.mjs | 2 +- .../actions/search-issues-with-jql/search-issues-with-jql.mjs | 2 +- components/jira/actions/transition-issue/transition-issue.mjs | 2 +- components/jira/actions/update-comment/update-comment.mjs | 2 +- components/jira/actions/update-issue/update-issue.mjs | 2 +- components/jira/sources/events/events.mjs | 2 +- components/jira/sources/issue-created/issue-created.mjs | 2 +- components/jira/sources/issue-deleted/issue-deleted.mjs | 2 +- components/jira/sources/issue-updated/issue-updated.mjs | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs b/components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs index 8c46991a5243d..b0db5a435a8e2 100644 --- a/components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs +++ b/components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs @@ -6,7 +6,7 @@ export default { key: "jira-add-attachment-to-issue", name: "Add Attachment To Issue", description: "Adds an attachment to an issue. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-issue-issueidorkey-attachments-post)", - version: "1.0.6", + version: "1.0.7", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs b/components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs index c3e057eae67e7..85df3f848a4b4 100644 --- a/components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs +++ b/components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs @@ -7,7 +7,7 @@ export default { key: "jira-add-comment-to-issue", name: "Add Comment To Issue", description: "Adds a new comment to an issue. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-post)", - version: "0.1.14", + version: "0.1.15", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs b/components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs index 0dc5b0261430c..e2deb68ead0bb 100644 --- a/components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs +++ b/components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs @@ -6,7 +6,7 @@ export default { key: "jira-add-multiple-attachments-to-issue", name: "Add Multiple Attachments To Issue", description: "Adds multiple attachments to an issue. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-issue-issueidorkey-attachments-post)", - version: "1.0.6", + version: "1.0.7", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs b/components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs index 26f512e12143b..3d084dde12bf6 100644 --- a/components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs +++ b/components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs @@ -3,7 +3,7 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-add-watcher-to-issue", name: "Add Watcher To Issue", - version: "0.0.13", + version: "0.0.14", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/assign-issue/assign-issue.mjs b/components/jira/actions/assign-issue/assign-issue.mjs index 93855d9a51efb..cea293ddef82a 100644 --- a/components/jira/actions/assign-issue/assign-issue.mjs +++ b/components/jira/actions/assign-issue/assign-issue.mjs @@ -3,7 +3,7 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-assign-issue", name: "Assign Issue", - version: "0.0.13", + version: "0.0.14", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs b/components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs index a95c085f289d9..3cf5da456aa48 100644 --- a/components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs +++ b/components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs @@ -5,7 +5,7 @@ export default { key: "jira-create-custom-field-options-context", name: "Create Custom Field Options (Context)", description: "Create a context for custom field options. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-post).", - version: "0.0.6", + version: "0.0.7", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/create-version/create-version.mjs b/components/jira/actions/create-version/create-version.mjs index 9ad4fbbdcf580..c83a0524434b6 100644 --- a/components/jira/actions/create-version/create-version.mjs +++ b/components/jira/actions/create-version/create-version.mjs @@ -4,7 +4,7 @@ export default { key: "jira-create-version", name: "Create Jira Version in Project", description: "Creates a project version. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/#api-rest-api-3-version-post)", - version: "0.1.14", + version: "0.1.15", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/delete-project/delete-project.mjs b/components/jira/actions/delete-project/delete-project.mjs index 36c7cbb65540f..a3bc2c898c34d 100644 --- a/components/jira/actions/delete-project/delete-project.mjs +++ b/components/jira/actions/delete-project/delete-project.mjs @@ -4,7 +4,7 @@ export default { key: "jira-delete-project", name: "Delete Project", description: "Deletes a project. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-projectidorkey-delete)", - version: "0.1.14", + version: "0.1.15", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/jira/actions/get-all-projects/get-all-projects.mjs b/components/jira/actions/get-all-projects/get-all-projects.mjs index 0dd7d074b1ed6..758c497b2d5f0 100644 --- a/components/jira/actions/get-all-projects/get-all-projects.mjs +++ b/components/jira/actions/get-all-projects/get-all-projects.mjs @@ -4,7 +4,7 @@ export default { key: "jira-get-all-projects", name: "Get All Projects", description: "Gets metadata on all projects. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-project-get)", - version: "0.1.15", + version: "0.1.16", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/get-issue/get-issue.mjs b/components/jira/actions/get-issue/get-issue.mjs index 89b179008e220..e73b25f258457 100644 --- a/components/jira/actions/get-issue/get-issue.mjs +++ b/components/jira/actions/get-issue/get-issue.mjs @@ -4,7 +4,7 @@ export default { key: "jira-get-issue", name: "Get Issue", description: "Gets the details for an issue. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get)", - version: "0.1.16", + version: "0.1.17", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/get-task/get-task.mjs b/components/jira/actions/get-task/get-task.mjs index 892b7ad088d23..d022f28b17ce1 100644 --- a/components/jira/actions/get-task/get-task.mjs +++ b/components/jira/actions/get-task/get-task.mjs @@ -4,7 +4,7 @@ export default { key: "jira-get-task", name: "Get Task", description: "Gets the status of a long-running asynchronous task. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-get)", - version: "0.1.14", + version: "0.1.15", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/get-transitions/get-transitions.mjs b/components/jira/actions/get-transitions/get-transitions.mjs index 64ab1d6a20823..ad974b2d4aafe 100644 --- a/components/jira/actions/get-transitions/get-transitions.mjs +++ b/components/jira/actions/get-transitions/get-transitions.mjs @@ -4,7 +4,7 @@ export default { key: "jira-get-transitions", name: "Get Transitions", description: "Gets either all transitions or a transition that can be performed by the user on an issue, based on the issue's status. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-get)", - version: "0.1.14", + version: "0.1.15", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/get-user/get-user.mjs b/components/jira/actions/get-user/get-user.mjs index 3def8154e0e94..8f389d1598685 100644 --- a/components/jira/actions/get-user/get-user.mjs +++ b/components/jira/actions/get-user/get-user.mjs @@ -4,7 +4,7 @@ export default { key: "jira-get-user", name: "Get User", description: "Gets details of user. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-get)", - version: "0.1.14", + version: "0.1.15", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/get-users/get-users.mjs b/components/jira/actions/get-users/get-users.mjs index 1e7ec16664549..3a6817cb2ae78 100644 --- a/components/jira/actions/get-users/get-users.mjs +++ b/components/jira/actions/get-users/get-users.mjs @@ -4,7 +4,7 @@ export default { key: "jira-get-users", name: "Get Users", description: "Gets the details for a list of users. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-search-get)", - version: "0.0.9", + version: "0.0.10", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/list-issue-comments/list-issue-comments.mjs b/components/jira/actions/list-issue-comments/list-issue-comments.mjs index 70bee5d737cf3..c81a61737e2d2 100644 --- a/components/jira/actions/list-issue-comments/list-issue-comments.mjs +++ b/components/jira/actions/list-issue-comments/list-issue-comments.mjs @@ -4,7 +4,7 @@ export default { key: "jira-list-issue-comments", name: "List Issue Comments", description: "Lists all comments for an issue. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-get)", - version: "0.1.14", + version: "0.1.15", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs b/components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs index ac40aa860e106..6fae736e11a51 100644 --- a/components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs +++ b/components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs @@ -4,7 +4,7 @@ export default { name: "Search Issues with JQL", description: "Search for issues using JQL (Jira Query Language). [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-jql-get)", key: "jira-search-issues-with-jql", - version: "0.1.2", + version: "0.1.3", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/transition-issue/transition-issue.mjs b/components/jira/actions/transition-issue/transition-issue.mjs index 2b8c5832d357a..5c942b1b70c55 100644 --- a/components/jira/actions/transition-issue/transition-issue.mjs +++ b/components/jira/actions/transition-issue/transition-issue.mjs @@ -5,7 +5,7 @@ export default { key: "jira-transition-issue", name: "Transition Issue", description: "Performs an issue transition and, if the transition has a screen, updates the fields from the transition screen. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-post)", - version: "0.1.16", + version: "0.1.17", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/jira/actions/update-comment/update-comment.mjs b/components/jira/actions/update-comment/update-comment.mjs index 3aa9f13efb65e..9623479cec172 100644 --- a/components/jira/actions/update-comment/update-comment.mjs +++ b/components/jira/actions/update-comment/update-comment.mjs @@ -7,7 +7,7 @@ export default { key: "jira-update-comment", name: "Update Comment", description: "Updates a comment. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-id-put)", - version: "0.1.14", + version: "0.1.15", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/jira/actions/update-issue/update-issue.mjs b/components/jira/actions/update-issue/update-issue.mjs index e0920a3045636..abc9405e40ac0 100644 --- a/components/jira/actions/update-issue/update-issue.mjs +++ b/components/jira/actions/update-issue/update-issue.mjs @@ -8,7 +8,7 @@ export default { key: "jira-update-issue", name: "Update Issue", description: "Updates an issue. A transition may be applied and issue properties updated as part of the edit. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put)", - version: "0.2.18", + version: "0.2.19", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/jira/sources/events/events.mjs b/components/jira/sources/events/events.mjs index 0b655b30f9c22..36cfa1832b702 100644 --- a/components/jira/sources/events/events.mjs +++ b/components/jira/sources/events/events.mjs @@ -5,7 +5,7 @@ export default { key: "jira-events", name: "New Event", description: "Emit new event when an event with subscribed event source triggered, [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-webhooks/#api-rest-api-3-webhook-post)", - version: "0.0.14", + version: "0.0.15", type: "source", dedupe: "unique", ...common, diff --git a/components/jira/sources/issue-created/issue-created.mjs b/components/jira/sources/issue-created/issue-created.mjs index 3857846e0d626..a4aa20f189049 100644 --- a/components/jira/sources/issue-created/issue-created.mjs +++ b/components/jira/sources/issue-created/issue-created.mjs @@ -4,7 +4,7 @@ export default { key: "jira-issue-created", name: "New Issue Created Event (Instant)", description: "Emit new event when an issue is created. Note that Jira supports only one webhook, if more sources are needed please use `New Event` source and select multiple events.", - version: "0.0.14", + version: "0.0.15", type: "source", dedupe: "unique", ...common, diff --git a/components/jira/sources/issue-deleted/issue-deleted.mjs b/components/jira/sources/issue-deleted/issue-deleted.mjs index 4d4232e72215f..cb43506f0e160 100644 --- a/components/jira/sources/issue-deleted/issue-deleted.mjs +++ b/components/jira/sources/issue-deleted/issue-deleted.mjs @@ -4,7 +4,7 @@ export default { key: "jira-issue-deleted", name: "New Issue Deleted Event (Instant)", description: "Emit new event when an issue is deleted. Note that Jira supports only one webhook, if more sources are needed please use `New Event` source and select multiple events.", - version: "0.0.14", + version: "0.0.15", type: "source", dedupe: "unique", ...common, diff --git a/components/jira/sources/issue-updated/issue-updated.mjs b/components/jira/sources/issue-updated/issue-updated.mjs index 48aa6284d557b..3374696931ee2 100644 --- a/components/jira/sources/issue-updated/issue-updated.mjs +++ b/components/jira/sources/issue-updated/issue-updated.mjs @@ -4,7 +4,7 @@ export default { key: "jira-issue-updated", name: "New Issue Updated Event (Instant)", description: "Emit new event when an issue is updated. Note that Jira supports only one webhook, if more sources are needed please use `New Event` source and select multiple events.", - version: "0.0.14", + version: "0.0.15", type: "source", dedupe: "unique", ...common, From 8e469c07055175bb031b220b53564fd983b038c6 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Wed, 5 Nov 2025 13:23:41 -0500 Subject: [PATCH 3/3] update --- components/jira/actions/create-issue/create-issue.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/jira/actions/create-issue/create-issue.mjs b/components/jira/actions/create-issue/create-issue.mjs index a8df5a2cbac1f..80b82616fe1c9 100644 --- a/components/jira/actions/create-issue/create-issue.mjs +++ b/components/jira/actions/create-issue/create-issue.mjs @@ -53,7 +53,7 @@ export default { issueTypeId, } = this; - if (isNaN(projectId) || !cloudId || !isNaN(issueTypeId)) { + if (isNaN(projectId) || !cloudId || isNaN(issueTypeId)) { existingProps.additionalProperties.optional = false; return {}; }