From b925e50e18d615ffb58a6f099f48031642e707bb Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Fri, 24 Oct 2025 13:48:28 -0400 Subject: [PATCH 1/3] jira improvements --- .../add-attachment-to-issue.mjs | 4 +- .../add-comment-to-issue.mjs | 24 ++++++-- .../add-multiple-attachments-to-issue.mjs | 4 +- .../add-watcher-to-issue.mjs | 4 +- .../actions/assign-issue/assign-issue.mjs | 4 +- components/jira/actions/common/issue.mjs | 6 +- .../create-custom-field-options-context.mjs | 4 +- .../actions/create-issue/create-issue.mjs | 8 +-- .../actions/create-version/create-version.mjs | 34 ++++------- .../actions/delete-project/delete-project.mjs | 8 +-- .../get-all-projects/get-all-projects.mjs | 8 +-- .../jira/actions/get-issue/get-issue.mjs | 10 ++-- components/jira/actions/get-task/get-task.mjs | 15 +++-- .../get-transitions/get-transitions.mjs | 28 +++++---- components/jira/actions/get-user/get-user.mjs | 4 +- .../jira/actions/get-users/get-users.mjs | 4 +- .../list-issue-comments.mjs | 6 +- .../search-issues-with-jql.mjs | 2 +- .../transition-issue/transition-issue.mjs | 16 ++--- .../actions/update-comment/update-comment.mjs | 43 ++++++++++---- .../actions/update-issue/update-issue.mjs | 6 +- components/jira/jira.app.mjs | 59 ++++++++++++++++--- components/jira/package.json | 2 +- components/jira/sources/events/events.mjs | 6 +- .../sources/issue-created/issue-created.mjs | 2 +- .../sources/issue-deleted/issue-deleted.mjs | 2 +- .../sources/issue-updated/issue-updated.mjs | 2 +- 27 files changed, 197 insertions(+), 118 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 99142f6a7264c..8c46991a5243d 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 @@ -5,8 +5,8 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-add-attachment-to-issue", name: "Add Attachment To Issue", - description: "Adds an attachment to an issue, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-issue-issueidorkey-attachments-post)", - version: "1.0.5", + 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", 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 6997f69ac8e45..c3e057eae67e7 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 @@ -1,11 +1,13 @@ import utils from "../../common/utils.mjs"; +import common from "../common/issue.mjs"; +import { ConfigurationError } from "@pipedream/platform"; import jira from "../../jira.app.mjs"; export default { key: "jira-add-comment-to-issue", name: "Add Comment To Issue", - description: "Adds a new comment to an issue, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-post)", - version: "0.1.13", + 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", annotations: { destructiveHint: false, openWorldHint: true, @@ -29,10 +31,17 @@ export default { }), ], }, + comment: { + type: "string", + label: "Comment", + description: "The comment text", + optional: true, + }, body: { type: "object", label: "Body", - description: "The comment text in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/), e.g. `{\"type\":\"doc\",\"version\":1,\"content\":[{\"content\":[{\"text\":\"This is a comment\",\"type\":\"text\"}],\"type\":\"paragraph\"}]}`", + description: "The comment text in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/), e.g. `{\"type\":\"doc\",\"version\":1,\"content\":[{\"content\":[{\"text\":\"This is a comment\",\"type\":\"text\"}],\"type\":\"paragraph\"}]}`. Will overwrite comment if both comment and body are provided", + optional: true, }, visibility: { type: "object", @@ -62,8 +71,15 @@ export default { }, }, async run({ $ }) { + if (!this.comment && !this.body) { + throw new ConfigurationError("Either comment or body is required"); + } const visibility = utils.parseObject(this.visibility); - const body = utils.parseObject(this.body); + + const body = this.body + ? utils.parseObject(this.body) + : common.methods.atlassianDocumentFormat(this.comment); + const additionalProperties = utils.parseObject(this.additionalProperties); let properties; try { 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 7ce9a378056b2..0dc5b0261430c 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 @@ -5,8 +5,8 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-add-multiple-attachments-to-issue", name: "Add Multiple Attachments To Issue", - description: "Adds multiple attachments to an issue, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-issue-issueidorkey-attachments-post)", - version: "1.0.5", + 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", 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 2c77b6d2e82d9..26f512e12143b 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,13 +3,13 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-add-watcher-to-issue", name: "Add Watcher To Issue", - version: "0.0.12", + version: "0.0.13", annotations: { destructiveHint: false, openWorldHint: true, readOnlyHint: false, }, - description: "Adds a user as a watcher of an issue by passing the account ID of the user, For example, `5b10ac8d82e05b22cc7d4ef5`, If no user is specified the calling user is added. [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-watchers/#api-rest-api-3-issue-issueidorkey-watchers-post)", + description: "Adds a user as a watcher of an issue by passing the account ID of the user, For example, `5b10ac8d82e05b22cc7d4ef5`, If no user is specified the calling user is added. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-watchers/#api-rest-api-3-issue-issueidorkey-watchers-post)", type: "action", props: { jira, diff --git a/components/jira/actions/assign-issue/assign-issue.mjs b/components/jira/actions/assign-issue/assign-issue.mjs index dcac21f3958d6..93855d9a51efb 100644 --- a/components/jira/actions/assign-issue/assign-issue.mjs +++ b/components/jira/actions/assign-issue/assign-issue.mjs @@ -3,13 +3,13 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-assign-issue", name: "Assign Issue", - version: "0.0.12", + version: "0.0.13", annotations: { destructiveHint: true, openWorldHint: true, readOnlyHint: false, }, - description: "Assigns an issue to a user. [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-assignee-put)", + description: "Assigns an issue to a user. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-assignee-put)", type: "action", props: { jira, diff --git a/components/jira/actions/common/issue.mjs b/components/jira/actions/common/issue.mjs index 4bcdbc487821e..74f8a8845009e 100644 --- a/components/jira/actions/common/issue.mjs +++ b/components/jira/actions/common/issue.mjs @@ -13,7 +13,7 @@ export default { historyMetadata: { type: "object", label: "History Metadata", - description: "Additional issue history details.", + description: "Additional issue history details", optional: true, }, properties: { @@ -21,12 +21,12 @@ export default { app, "properties", ], - description: "Details of issue properties to be add or update, please provide an array of objects with keys and values.", + description: "Details of issue properties to be added or updated. Please provide an array of objects with keys and values.", }, update: { type: "object", label: "Update", - description: "A Map containing the field name and a list of operations to perform on the issue screen field. Note that fields included in here cannot be included in `fields`.", + description: "A Map containing the field name and a list of operations to perform on the issue screen field. Note that fields included here cannot be included in `fields`.", optional: true, }, additionalProperties: { 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 7f0498f74c52e..a95c085f289d9 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 @@ -4,8 +4,8 @@ import app from "../../jira.app.mjs"; 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 here](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.5", + 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", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/jira/actions/create-issue/create-issue.mjs b/components/jira/actions/create-issue/create-issue.mjs index 108bcb02d5f8a..dc53ea9aeb7b4 100644 --- a/components/jira/actions/create-issue/create-issue.mjs +++ b/components/jira/actions/create-issue/create-issue.mjs @@ -6,8 +6,8 @@ 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 docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-post)", - version: "0.1.24", + 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", annotations: { destructiveHint: false, openWorldHint: true, @@ -18,8 +18,8 @@ export default { ...common.props, updateHistory: { type: "boolean", - label: "Update history", - description: "Whether the project in which the issue is created is added to the user's **Recently viewed** project list, as shown under **Projects** in Jira.", + label: "Update History", + description: "Whether the project in which the issue is created is added to the user's **Recently viewed** project list, as shown under **Projects** in Jira", optional: true, }, projectId: { diff --git a/components/jira/actions/create-version/create-version.mjs b/components/jira/actions/create-version/create-version.mjs index d0468ad5163fd..9ad4fbbdcf580 100644 --- a/components/jira/actions/create-version/create-version.mjs +++ b/components/jira/actions/create-version/create-version.mjs @@ -2,9 +2,9 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-create-version", - name: "Create Jira Version in project", - description: "Creates a project version., [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/#api-rest-api-3-version-post)", - version: "0.1.13", + 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", annotations: { destructiveHint: false, openWorldHint: true, @@ -30,51 +30,39 @@ export default { }, name: { type: "string", - label: "Version name", - description: "The unique name of the version. Required when creating a version. The maximum length is 255 characters.", + label: "Version Name", + description: "The unique name of the version. The maximum length is 255 characters.", }, description: { type: "string", label: "Description", - description: "The description of the version.", + description: "The description of the version", optional: true, }, archived: { type: "boolean", label: "Archived", - description: "Indicates that the version is archived.", - optional: true, - }, - released: { - type: "boolean", - label: "Released", - description: "Indicates that the version is released. If the version is released a request to release again is ignored. Not applicable when creating a version.", + description: "Indicates that the version is archived", optional: true, }, startDate: { type: "string", - label: "Start date", + label: "Start Date", description: "The start date of the version. Expressed in ISO 8601 format (yyyy-mm-dd).", optional: true, }, releaseDate: { type: "string", - label: "Release date", + label: "Release Date", description: "The release date of the version. Expressed in ISO 8601 format (yyyy-mm-dd).", optional: true, }, - moveUnfixedIssuesTo: { - type: "string", - label: "Move unfixed issues to", - description: "The URL of the self link to the version to which all unfixed issues are moved when a version is released. Not applicable when creating a version. Optional when updating a version.", - optional: true, - }, expand: { propDefinition: [ jira, "expand", ], - description: "Use expand to include additional information about version in the response. This parameter accepts a comma-separated list. Expand options include:\n`operations` Returns the list of operations available for this version.\n`issuesstatus` Returns the count of issues in this version for each of the status categories `to do`, `in progress`, `done`, and `unmapped`.", + description: "Use expand to include additional information about the version in the response. This parameter accepts a comma-separated list. Expand options include:\n`operations` Returns the list of operations available for this version.\n`issuesstatus` Returns the count of issues in this version for each of the status categories `to do`, `in progress`, `done`, and `unmapped`.", }, }, async run({ $ }) { @@ -86,10 +74,8 @@ export default { name: this.name, description: this.description, archived: this.archived, - released: this.released, startDate: this.startDate, releaseDate: this.releaseDate, - moveUnfixedIssuesTo: this.moveUnfixedIssuesTo, expand: this.expand, }, }); diff --git a/components/jira/actions/delete-project/delete-project.mjs b/components/jira/actions/delete-project/delete-project.mjs index 21305d9d47a81..36c7cbb65540f 100644 --- a/components/jira/actions/delete-project/delete-project.mjs +++ b/components/jira/actions/delete-project/delete-project.mjs @@ -3,8 +3,8 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-delete-project", name: "Delete Project", - description: "Deletes a project, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-projectidorkey-delete)", - version: "0.1.13", + 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", annotations: { destructiveHint: true, openWorldHint: true, @@ -30,8 +30,8 @@ export default { }, enableUndo: { type: "boolean", - label: "Enable undo", - description: "Whether this project is placed in the Jira recycle bin where it will be available for restoration.", + label: "Enable Undo", + description: "Whether this project is placed in the Jira recycle bin where it will be available for restoration", }, }, async run({ $ }) { 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 8300b08db2bdf..0dd7d074b1ed6 100644 --- a/components/jira/actions/get-all-projects/get-all-projects.mjs +++ b/components/jira/actions/get-all-projects/get-all-projects.mjs @@ -3,8 +3,8 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-get-all-projects", name: "Get All Projects", - description: "Gets metadata on all projects, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-project-get)", - version: "0.1.14", + 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", annotations: { destructiveHint: false, openWorldHint: true, @@ -21,7 +21,7 @@ export default { }, recent: { type: "integer", - label: "Recent", + label: "Recent Projects", description: "Returns the user's most recently accessed projects. You may specify the number of results to return up to a maximum of 20. If access is anonymous, then the recently accessed projects are based on the current HTTP session.", optional: true, }, @@ -30,7 +30,7 @@ export default { jira, "properties", ], - description: "Details of issue properties to be add or update, please provide an array of objects with keys and values.", + description: "Details of issue properties to be added or updated. Please provide an array of objects with keys and values.", }, expand: { propDefinition: [ diff --git a/components/jira/actions/get-issue/get-issue.mjs b/components/jira/actions/get-issue/get-issue.mjs index d6474349dad94..89b179008e220 100644 --- a/components/jira/actions/get-issue/get-issue.mjs +++ b/components/jira/actions/get-issue/get-issue.mjs @@ -3,8 +3,8 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-get-issue", name: "Get Issue", - description: "Gets the details for an issue. [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get)", - version: "0.1.15", + 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", annotations: { destructiveHint: false, openWorldHint: true, @@ -36,7 +36,7 @@ export default { }, fieldsByKeys: { type: "boolean", - label: "Fields by keys", + label: "Fields By Keys", description: "Whether `fields` in fields are referenced by keys rather than IDs. This parameter is useful where fields have been added by a connect app and a field's key may differ from its ID.", optional: true, }, @@ -49,8 +49,8 @@ export default { }, updateHistory: { type: "boolean", - label: "Update history", - description: "Whether the project in which the issue is created is added to the user's Recently viewed project list, as shown under Projects in Jira.", + label: "Update History", + description: "Whether the project in which the issue is created is added to the user's Recently viewed project list, as shown under Projects in Jira", optional: true, }, expand: { diff --git a/components/jira/actions/get-task/get-task.mjs b/components/jira/actions/get-task/get-task.mjs index ee99b115f7259..892b7ad088d23 100644 --- a/components/jira/actions/get-task/get-task.mjs +++ b/components/jira/actions/get-task/get-task.mjs @@ -3,8 +3,8 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-get-task", name: "Get Task", - description: "Gets the status of a long-running asynchronous task, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-get)", - version: "0.1.13", + 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", annotations: { destructiveHint: false, openWorldHint: true, @@ -20,7 +20,14 @@ export default { ], }, taskId: { - type: "string", + propDefinition: [ + jira, + "issueIdOrKey", + (c) => ({ + cloudId: c.cloudId, + tasksOnly: true, + }), + ], label: "Task ID", description: "The ID of the task to get details of. A task is a resource that represents a [long-running asynchronous tasks](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations).", }, @@ -31,7 +38,7 @@ export default { cloudId: this.cloudId, taskId: this.taskId, }); - $.export("$summary", `Task: '${response.title}' has been retrieved.`); + $.export("$summary", `Task with ID: '${this.taskId}' has been retrieved.`); return response; }, }; diff --git a/components/jira/actions/get-transitions/get-transitions.mjs b/components/jira/actions/get-transitions/get-transitions.mjs index 1c7a69f536892..cd4fe62bf99a9 100644 --- a/components/jira/actions/get-transitions/get-transitions.mjs +++ b/components/jira/actions/get-transitions/get-transitions.mjs @@ -3,8 +3,8 @@ import jira from "../../jira.app.mjs"; 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 docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-get)", - version: "0.1.13", + 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", annotations: { destructiveHint: false, openWorldHint: true, @@ -29,27 +29,33 @@ export default { ], }, transitionId: { - type: "string", + propDefinition: [ + jira, + "transition", + (c) => ({ + issueIdOrKey: c.issueIdOrKey, + cloudId: c.cloudId, + }), + ], label: "Transition ID", - description: "The ID of the transition.", - optional: true, + description: "The ID of the transition", }, skipRemoteOnlyCondition: { type: "boolean", - label: "Skip remote only condition", - description: "Whether transitions with the condition *Hide From User Condition* are included in the response.", + label: "Skip $emote Only Condition", + description: "Whether transitions with the condition *Hide From User Condition* are included in the response", optional: true, }, includeUnavailableTransitions: { type: "boolean", - label: "Include unavailable transitions", - description: "Whether details of transitions that fail a condition are included in the response.", + label: "Include Unavailable Transitions", + description: "Whether details of transitions that fail a condition are included in the response", optional: true, }, sortByOpsBarAndStatus: { type: "boolean", - label: "Sort by ops bar and status", - description: "Whether the transitions are sorted by ops-bar sequence value first then category order (Todo, In Progress, Done) or only by ops-bar sequence value.", + label: "Sort by Ops Bar and Status", + description: "Whether the transitions are sorted by ops-bar sequence value first then category order (Todo, In Progress, Done) or only by ops-bar sequence value", optional: true, }, expand: { diff --git a/components/jira/actions/get-user/get-user.mjs b/components/jira/actions/get-user/get-user.mjs index b067427a0a457..3def8154e0e94 100644 --- a/components/jira/actions/get-user/get-user.mjs +++ b/components/jira/actions/get-user/get-user.mjs @@ -3,8 +3,8 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-get-user", name: "Get User", - description: "Gets details of user, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-get)", - version: "0.1.13", + 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", 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 aa091b1c0f684..089e0568d332b 100644 --- a/components/jira/actions/get-users/get-users.mjs +++ b/components/jira/actions/get-users/get-users.mjs @@ -3,8 +3,8 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-get-users", name: "Get Users", - description: "Gets details of a list of users. [See docs here](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-search-get)", - version: "0.0.8", + description: "Getsthe 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", 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 47a1734cbdc1b..70bee5d737cf3 100644 --- a/components/jira/actions/list-issue-comments/list-issue-comments.mjs +++ b/components/jira/actions/list-issue-comments/list-issue-comments.mjs @@ -3,8 +3,8 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-list-issue-comments", name: "List Issue Comments", - description: "Lists all comments for an issue, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-get)", - version: "0.1.13", + 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", annotations: { destructiveHint: false, openWorldHint: true, @@ -30,7 +30,7 @@ export default { }, orderBy: { type: "string", - label: "Order by", + label: "Order By", description: "[Order](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#ordering) the results by a field. Accepts *created* to sort comments by their created date.\nValid values: `created`, `-created`, `+created`.", optional: true, options: [ 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 35632cabef21f..ac40aa860e106 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.1", + version: "0.1.2", 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 08d1cc541878a..2b8c5832d357a 100644 --- a/components/jira/actions/transition-issue/transition-issue.mjs +++ b/components/jira/actions/transition-issue/transition-issue.mjs @@ -4,8 +4,8 @@ import jira from "../../jira.app.mjs"; 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 docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-post)", - version: "0.1.15", + 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", annotations: { destructiveHint: true, openWorldHint: true, @@ -49,25 +49,25 @@ export default { update: { type: "object", label: "Update", - description: "List of operations to perform on issue screen fields. Note that fields included in here cannot be included in fields.", + description: "List of operations to perform on issue screen fields. Note that fields included here cannot be included in fields.", optional: true, }, historyMetadata: { type: "object", - label: "History metadata", - description: "Additional issue history details, See `HistoryMetadata` section of [doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-post)", + label: "History Metadata", + description: "Additional issue history details. See `HistoryMetadata` section of [doc](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-post)", optional: true, }, properties: { type: "string", label: "Properties", - description: "Details of issue properties to be add or update.", + description: "Details of issue properties to be add or update", optional: true, }, additionalProperties: { type: "object", - label: "Additional properties", - description: "Extra properties of any type may be provided to this object.", + label: "Additional Properties", + description: "Extra properties of any type may be provided to this object", optional: true, }, }, diff --git a/components/jira/actions/update-comment/update-comment.mjs b/components/jira/actions/update-comment/update-comment.mjs index 9362979e1c3ff..3aa9f13efb65e 100644 --- a/components/jira/actions/update-comment/update-comment.mjs +++ b/components/jira/actions/update-comment/update-comment.mjs @@ -1,11 +1,13 @@ import utils from "../../common/utils.mjs"; +import common from "../common/issue.mjs"; +import { ConfigurationError } from "@pipedream/platform"; import jira from "../../jira.app.mjs"; export default { key: "jira-update-comment", name: "Update Comment", - description: "Updates a comment, [See the docs](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.13", + 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", annotations: { destructiveHint: true, openWorldHint: true, @@ -30,14 +32,26 @@ export default { ], }, commentId: { - type: "string", - label: "Comment ID", - description: "The ID of the comment.", + propDefinition: [ + jira, + "commentId", + (c) => ({ + cloudId: c.cloudId, + issueIdOrKey: c.issueIdOrKey, + }), + ], }, body: { type: "object", label: "Body", - description: "The comment text in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/), e.g. `{\"type\":\"doc\",\"version\":1,\"content\":[{\"content\":[{\"text\":\"This is a comment\",\"type\":\"text\"}],\"type\":\"paragraph\"}]}`", + description: "The comment text in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/), e.g. `{\"type\":\"doc\",\"version\":1,\"content\":[{\"content\":[{\"text\":\"This is a comment\",\"type\":\"text\"}],\"type\":\"paragraph\"}]}`. Will overwrite comment if both comment and body are provided", + optional: true, + }, + comment: { + type: "string", + label: "Comment", + description: "The comment text", + optional: true, }, visibility: { type: "object", @@ -50,7 +64,7 @@ export default { jira, "properties", ], - description: "Details of issue properties to be add or update, please provide an array of objects with keys and values.", + description: "Details of issue properties to be added or updated. Please provide an array of objects with keys and values.", }, additionalProperties: { propDefinition: [ @@ -60,8 +74,8 @@ export default { }, notifyUsers: { type: "boolean", - label: "Notify users", - description: "Whether users are notified when a comment is updated.", + label: "Notify Users", + description: "Whether users are notified when a comment is updated", optional: true, }, expand: { @@ -73,7 +87,16 @@ export default { }, }, async run({ $ }) { - const body = utils.parseObject(this.body); + if (!this.comment && !this.body) { + throw new ConfigurationError("Either comment or body is required"); + } + + const body = this.body + ? utils.parseObject(this.body) + : this.comment + ? common.methods.atlassianDocumentFormat(this.comment) + : undefined; + const visibility = utils.parseObject(this.visibility); const additionalProperties = utils.parseObject(this.additionalProperties); let properties; diff --git a/components/jira/actions/update-issue/update-issue.mjs b/components/jira/actions/update-issue/update-issue.mjs index 3ddff6bef47a3..e0920a3045636 100644 --- a/components/jira/actions/update-issue/update-issue.mjs +++ b/components/jira/actions/update-issue/update-issue.mjs @@ -7,8 +7,8 @@ export default { ...common, 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 docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put)", - version: "0.2.17", + 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", annotations: { destructiveHint: true, openWorldHint: true, @@ -85,7 +85,7 @@ export default { transitionLooped: { type: "boolean", label: "Transition Looped", - description: "Whether the transition is looped.", + description: "Whether the transition is looped", optional: true, }, }, diff --git a/components/jira/jira.app.mjs b/components/jira/jira.app.mjs index 78b78b94b7337..0ae2130faeb8f 100644 --- a/components/jira/jira.app.mjs +++ b/components/jira/jira.app.mjs @@ -86,17 +86,20 @@ export default { }, issueIdOrKey: { type: "string", - label: "Issue id or key", - description: "The ID or key of the issue where the attachment will be added to.", + label: "Issue ID or Key", + description: "The ID or key of the issue where the attachment will be added", async options({ - prevContext, cloudId, + prevContext, cloudId, tasksOnly = false, }) { let { startAt } = prevContext || {}; const pageSize = 50; + const jql = tasksOnly + ? "project is not EMPTY AND issuetype = \"Task\" ORDER BY created DESC" + : "project is not EMPTY ORDER BY created DESC"; const resp = await this.searchIssues({ cloudId, params: { - jql: "project is not EMPTY ORDER BY created DESC", + jql, startAt, maxResults: pageSize, fields: "id,key", @@ -118,7 +121,7 @@ export default { }, accountId: { type: "string", - label: "Assignee Id", + label: "Assignee ID", description: "The account ID of the user, which uniquely identifies the user across all Atlassian products, For example, `5b10ac8d82e05b22cc7d4ef5`", useQuery: true, async options({ @@ -151,7 +154,7 @@ export default { properties: { type: "string", label: "Properties", - description: "A list of properties.", + description: "A list of properties", optional: true, }, expand: { @@ -168,7 +171,7 @@ export default { additionalProperties: { type: "object", label: "Additional properties", - description: "Extra properties of any type may be provided to this object.", + description: "Extra properties of any type may be provided to this object", optional: true, }, transition: { @@ -219,7 +222,7 @@ export default { fieldId: { type: "string", label: "Field ID", - description: "The ID of the field.", + description: "The ID of the field", useQuery: true, async options({ query, @@ -269,7 +272,7 @@ export default { contextId: { type: "string", label: "Context ID", - description: "The ID of the context.", + description: "The ID of the context", async options({ prevContext: { hasMore, @@ -311,6 +314,44 @@ export default { }; }, }, + commentId: { + type: "string", + label: "Comment ID", + description: "The ID of the comment", + async options({ + prevContext, issueIdOrKey, cloudId, + }) { + if (!issueIdOrKey) { + return []; + } + let { startAt } = prevContext || {}; + const pageSize = 50; + try { + const resp = await this.listIssueComments({ + issueIdOrKey, + cloudId, + params: { + startAt, + maxResults: pageSize, + }, + }); + startAt = startAt > 0 + ? startAt + pageSize + : pageSize; + return { + options: resp?.comments?.map((comment) => ({ + value: comment.id, + label: comment.body?.content[0]?.content[0]?.text || comment.id, + })), + context: { + startAt, + }, + }; + } catch { + return []; + } + }, + }, }, methods: { _getHeaders(headers = {}) { diff --git a/components/jira/package.json b/components/jira/package.json index 68272573ec0ba..eac53276d4a2d 100644 --- a/components/jira/package.json +++ b/components/jira/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/jira", - "version": "1.1.0", + "version": "1.1.1", "description": "Pipedream Jira Components", "main": "jira.app.mjs", "keywords": [ diff --git a/components/jira/sources/events/events.mjs b/components/jira/sources/events/events.mjs index 2c4b87a6df895..0b655b30f9c22 100644 --- a/components/jira/sources/events/events.mjs +++ b/components/jira/sources/events/events.mjs @@ -4,8 +4,8 @@ import eventsTypes from "../common/eventTypes.mjs"; export default { key: "jira-events", name: "New Event", - description: "Emit new event when an event with subscribed event source triggered, [See the docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-webhooks/#api-rest-api-3-webhook-post)", - version: "0.0.13", + 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", type: "source", dedupe: "unique", ...common, @@ -14,7 +14,7 @@ export default { events: { type: "string[]", label: "Event types", - description: "he Jira events that trigger the webhook.", + description: "The Jira events that trigger the webhook", options: eventsTypes, }, }, diff --git a/components/jira/sources/issue-created/issue-created.mjs b/components/jira/sources/issue-created/issue-created.mjs index ac3b65678f222..3857846e0d626 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.13", + version: "0.0.14", 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 1193bbc717be7..4d4232e72215f 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.13", + version: "0.0.14", 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 7d2147ba52b0e..48aa6284d557b 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.13", + version: "0.0.14", type: "source", dedupe: "unique", ...common, From 02c5678122834fd6fee4915bbb8461f9176646d6 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Fri, 24 Oct 2025 13:52:10 -0400 Subject: [PATCH 2/3] typo --- components/jira/actions/get-transitions/get-transitions.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/jira/actions/get-transitions/get-transitions.mjs b/components/jira/actions/get-transitions/get-transitions.mjs index cd4fe62bf99a9..64ab1d6a20823 100644 --- a/components/jira/actions/get-transitions/get-transitions.mjs +++ b/components/jira/actions/get-transitions/get-transitions.mjs @@ -42,7 +42,7 @@ export default { }, skipRemoteOnlyCondition: { type: "boolean", - label: "Skip $emote Only Condition", + label: "Skip Remote Only Condition", description: "Whether transitions with the condition *Hide From User Condition* are included in the response", optional: true, }, From 676c8c04cffabd36dd544a0f6e501b2376b15424 Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Fri, 24 Oct 2025 14:05:43 -0400 Subject: [PATCH 3/3] updates --- components/jira/actions/get-users/get-users.mjs | 2 +- components/jira/jira.app.mjs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/jira/actions/get-users/get-users.mjs b/components/jira/actions/get-users/get-users.mjs index 089e0568d332b..1e7ec16664549 100644 --- a/components/jira/actions/get-users/get-users.mjs +++ b/components/jira/actions/get-users/get-users.mjs @@ -3,7 +3,7 @@ import jira from "../../jira.app.mjs"; export default { key: "jira-get-users", name: "Get Users", - description: "Getsthe 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)", + 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", annotations: { destructiveHint: false, diff --git a/components/jira/jira.app.mjs b/components/jira/jira.app.mjs index 0ae2130faeb8f..4fc72faec3a85 100644 --- a/components/jira/jira.app.mjs +++ b/components/jira/jira.app.mjs @@ -56,7 +56,7 @@ export default { issueType: { type: "string", label: "Issue Type", - description: "An ID identifying the type of issue, [Check the API docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-post) to see available options", + description: "An ID identifying the type of issue. [Check the API docs](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-post) to see available options", async options({ cloudId, projectId, }) { @@ -87,7 +87,7 @@ export default { issueIdOrKey: { type: "string", label: "Issue ID or Key", - description: "The ID or key of the issue where the attachment will be added", + description: "The ID or key of an issue", async options({ prevContext, cloudId, tasksOnly = false, }) {