Skip to content

Commit c710b28

Browse files
authored
Merging pull request #18859
* jira improvements * typo * updates
1 parent 85334a2 commit c710b28

File tree

27 files changed

+198
-119
lines changed

27 files changed

+198
-119
lines changed

components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import jira from "../../jira.app.mjs";
55
export default {
66
key: "jira-add-attachment-to-issue",
77
name: "Add Attachment To Issue",
8-
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)",
9-
version: "1.0.5",
8+
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)",
9+
version: "1.0.6",
1010
annotations: {
1111
destructiveHint: false,
1212
openWorldHint: true,

components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import utils from "../../common/utils.mjs";
2+
import common from "../common/issue.mjs";
3+
import { ConfigurationError } from "@pipedream/platform";
24
import jira from "../../jira.app.mjs";
35

46
export default {
57
key: "jira-add-comment-to-issue",
68
name: "Add Comment To Issue",
7-
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)",
8-
version: "0.1.13",
9+
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)",
10+
version: "0.1.14",
911
annotations: {
1012
destructiveHint: false,
1113
openWorldHint: true,
@@ -29,10 +31,17 @@ export default {
2931
}),
3032
],
3133
},
34+
comment: {
35+
type: "string",
36+
label: "Comment",
37+
description: "The comment text",
38+
optional: true,
39+
},
3240
body: {
3341
type: "object",
3442
label: "Body",
35-
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\"}]}`",
43+
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",
44+
optional: true,
3645
},
3746
visibility: {
3847
type: "object",
@@ -62,8 +71,15 @@ export default {
6271
},
6372
},
6473
async run({ $ }) {
74+
if (!this.comment && !this.body) {
75+
throw new ConfigurationError("Either comment or body is required");
76+
}
6577
const visibility = utils.parseObject(this.visibility);
66-
const body = utils.parseObject(this.body);
78+
79+
const body = this.body
80+
? utils.parseObject(this.body)
81+
: common.methods.atlassianDocumentFormat(this.comment);
82+
6783
const additionalProperties = utils.parseObject(this.additionalProperties);
6884
let properties;
6985
try {

components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import jira from "../../jira.app.mjs";
55
export default {
66
key: "jira-add-multiple-attachments-to-issue",
77
name: "Add Multiple Attachments To Issue",
8-
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)",
9-
version: "1.0.5",
8+
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)",
9+
version: "1.0.6",
1010
annotations: {
1111
destructiveHint: false,
1212
openWorldHint: true,

components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import jira from "../../jira.app.mjs";
33
export default {
44
key: "jira-add-watcher-to-issue",
55
name: "Add Watcher To Issue",
6-
version: "0.0.12",
6+
version: "0.0.13",
77
annotations: {
88
destructiveHint: false,
99
openWorldHint: true,
1010
readOnlyHint: false,
1111
},
12-
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)",
12+
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)",
1313
type: "action",
1414
props: {
1515
jira,

components/jira/actions/assign-issue/assign-issue.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import jira from "../../jira.app.mjs";
33
export default {
44
key: "jira-assign-issue",
55
name: "Assign Issue",
6-
version: "0.0.12",
6+
version: "0.0.13",
77
annotations: {
88
destructiveHint: true,
99
openWorldHint: true,
1010
readOnlyHint: false,
1111
},
12-
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)",
12+
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)",
1313
type: "action",
1414
props: {
1515
jira,

components/jira/actions/common/issue.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ export default {
1313
historyMetadata: {
1414
type: "object",
1515
label: "History Metadata",
16-
description: "Additional issue history details.",
16+
description: "Additional issue history details",
1717
optional: true,
1818
},
1919
properties: {
2020
propDefinition: [
2121
app,
2222
"properties",
2323
],
24-
description: "Details of issue properties to be add or update, please provide an array of objects with keys and values.",
24+
description: "Details of issue properties to be added or updated. Please provide an array of objects with keys and values.",
2525
},
2626
update: {
2727
type: "object",
2828
label: "Update",
29-
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`.",
29+
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`.",
3030
optional: true,
3131
},
3232
additionalProperties: {

components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import app from "../../jira.app.mjs";
44
export default {
55
key: "jira-create-custom-field-options-context",
66
name: "Create Custom Field Options (Context)",
7-
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).",
8-
version: "0.0.5",
7+
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).",
8+
version: "0.0.6",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,

components/jira/actions/create-issue/create-issue.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export default {
66
...common,
77
key: "jira-create-issue",
88
name: "Create Issue",
9-
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)",
10-
version: "0.1.24",
9+
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)",
10+
version: "0.1.25",
1111
annotations: {
1212
destructiveHint: false,
1313
openWorldHint: true,
@@ -18,8 +18,8 @@ export default {
1818
...common.props,
1919
updateHistory: {
2020
type: "boolean",
21-
label: "Update history",
22-
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.",
21+
label: "Update History",
22+
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",
2323
optional: true,
2424
},
2525
projectId: {

components/jira/actions/create-version/create-version.mjs

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import jira from "../../jira.app.mjs";
22

33
export default {
44
key: "jira-create-version",
5-
name: "Create Jira Version in project",
6-
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)",
7-
version: "0.1.13",
5+
name: "Create Jira Version in Project",
6+
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)",
7+
version: "0.1.14",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,
@@ -30,51 +30,39 @@ export default {
3030
},
3131
name: {
3232
type: "string",
33-
label: "Version name",
34-
description: "The unique name of the version. Required when creating a version. The maximum length is 255 characters.",
33+
label: "Version Name",
34+
description: "The unique name of the version. The maximum length is 255 characters.",
3535
},
3636
description: {
3737
type: "string",
3838
label: "Description",
39-
description: "The description of the version.",
39+
description: "The description of the version",
4040
optional: true,
4141
},
4242
archived: {
4343
type: "boolean",
4444
label: "Archived",
45-
description: "Indicates that the version is archived.",
46-
optional: true,
47-
},
48-
released: {
49-
type: "boolean",
50-
label: "Released",
51-
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.",
45+
description: "Indicates that the version is archived",
5246
optional: true,
5347
},
5448
startDate: {
5549
type: "string",
56-
label: "Start date",
50+
label: "Start Date",
5751
description: "The start date of the version. Expressed in ISO 8601 format (yyyy-mm-dd).",
5852
optional: true,
5953
},
6054
releaseDate: {
6155
type: "string",
62-
label: "Release date",
56+
label: "Release Date",
6357
description: "The release date of the version. Expressed in ISO 8601 format (yyyy-mm-dd).",
6458
optional: true,
6559
},
66-
moveUnfixedIssuesTo: {
67-
type: "string",
68-
label: "Move unfixed issues to",
69-
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.",
70-
optional: true,
71-
},
7260
expand: {
7361
propDefinition: [
7462
jira,
7563
"expand",
7664
],
77-
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`.",
65+
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`.",
7866
},
7967
},
8068
async run({ $ }) {
@@ -86,10 +74,8 @@ export default {
8674
name: this.name,
8775
description: this.description,
8876
archived: this.archived,
89-
released: this.released,
9077
startDate: this.startDate,
9178
releaseDate: this.releaseDate,
92-
moveUnfixedIssuesTo: this.moveUnfixedIssuesTo,
9379
expand: this.expand,
9480
},
9581
});

components/jira/actions/delete-project/delete-project.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import jira from "../../jira.app.mjs";
33
export default {
44
key: "jira-delete-project",
55
name: "Delete Project",
6-
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)",
7-
version: "0.1.13",
6+
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)",
7+
version: "0.1.14",
88
annotations: {
99
destructiveHint: true,
1010
openWorldHint: true,
@@ -30,8 +30,8 @@ export default {
3030
},
3131
enableUndo: {
3232
type: "boolean",
33-
label: "Enable undo",
34-
description: "Whether this project is placed in the Jira recycle bin where it will be available for restoration.",
33+
label: "Enable Undo",
34+
description: "Whether this project is placed in the Jira recycle bin where it will be available for restoration",
3535
},
3636
},
3737
async run({ $ }) {

0 commit comments

Comments
 (0)