Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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",
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions components/jira/actions/assign-issue/assign-issue.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions components/jira/actions/common/issue.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ export default {
historyMetadata: {
type: "object",
label: "History Metadata",
description: "Additional issue history details.",
description: "Additional issue history details",
optional: true,
},
properties: {
propDefinition: [
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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions components/jira/actions/create-issue/create-issue.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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: {
Expand Down
34 changes: 10 additions & 24 deletions components/jira/actions/create-version/create-version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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({ $ }) {
Expand All @@ -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,
},
});
Expand Down
8 changes: 4 additions & 4 deletions components/jira/actions/delete-project/delete-project.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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({ $ }) {
Expand Down
8 changes: 4 additions & 4 deletions components/jira/actions/get-all-projects/get-all-projects.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
},
Expand All @@ -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: [
Expand Down
10 changes: 5 additions & 5 deletions components/jira/actions/get-issue/get-issue.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
},
Expand All @@ -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: {
Expand Down
15 changes: 11 additions & 4 deletions components/jira/actions/get-task/get-task.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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).",
},
Expand All @@ -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;
},
};
Loading
Loading