@itentialopensource/adapter-jira 1.7.2 → 1.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +1 -0
- package/AUTH.md +39 -0
- package/BROKER.md +199 -0
- package/CALLS.md +7365 -0
- package/CHANGELOG.md +24 -0
- package/CODE_OF_CONDUCT.md +12 -17
- package/CONTRIBUTING.md +88 -74
- package/ENHANCE.md +69 -0
- package/PROPERTIES.md +641 -0
- package/README.md +228 -420
- package/SUMMARY.md +9 -0
- package/SYSTEMINFO.md +11 -0
- package/TROUBLESHOOT.md +47 -0
- package/adapter.js +18753 -4899
- package/adapterBase.js +1274 -236
- package/entities/.generic/action.json +214 -0
- package/entities/.generic/schema.json +28 -0
- package/entities/Avatars/action.json +63 -0
- package/entities/Avatars/schema.json +4 -1
- package/entities/Dashboards/action.json +80 -0
- package/entities/Dashboards/mockdatafiles/copyDashboard-default.json +13 -0
- package/entities/Dashboards/mockdatafiles/createDashboard-default.json +13 -0
- package/entities/Dashboards/mockdatafiles/updateDashboard-default.json +13 -0
- package/entities/Dashboards/schema.json +5 -1
- package/entities/Groups/action.json +21 -0
- package/entities/Groups/mockdatafiles/bulkGetGroups-default.json +16 -0
- package/entities/Groups/schema.json +2 -1
- package/entities/InstanceInformation/action.json +25 -0
- package/entities/InstanceInformation/mockdatafiles/getLicense-default.json +20 -0
- package/entities/InstanceInformation/schema.json +19 -0
- package/entities/IssueCustomFieldConfigurationApps/action.json +45 -0
- package/entities/IssueCustomFieldConfigurationApps/mockdatafiles/getCustomFieldConfiguration-default.json +34 -0
- package/entities/IssueCustomFieldConfigurationApps/schema.json +20 -0
- package/entities/IssueCustomFieldContexts/action.json +268 -0
- package/entities/IssueCustomFieldContexts/mockdatafiles/createCustomFieldContext-default.json +9 -0
- package/entities/IssueCustomFieldContexts/mockdatafiles/getContextsForField-default.json +22 -0
- package/entities/IssueCustomFieldContexts/mockdatafiles/getCustomFieldContextsForProjectsAndIssueTypes-default.json +23 -0
- package/entities/IssueCustomFieldContexts/mockdatafiles/getDefaultValues-default.json +22 -0
- package/entities/IssueCustomFieldContexts/mockdatafiles/getIssueTypeMappingsForContexts-default.json +20 -0
- package/entities/IssueCustomFieldContexts/mockdatafiles/getProjectContextMapping-default.json +16 -0
- package/entities/IssueCustomFieldContexts/schema.json +31 -0
- package/entities/IssueCustomFieldOptions/action.json +105 -0
- package/entities/IssueCustomFieldOptions/mockdatafiles/createCustomFieldOption-default.json +20 -0
- package/entities/IssueCustomFieldOptions/mockdatafiles/getOptionsForContext-default.json +26 -0
- package/entities/IssueCustomFieldOptions/mockdatafiles/updateCustomFieldOption-default.json +19 -0
- package/entities/IssueCustomFieldOptions/schema.json +23 -0
- package/entities/IssueCustomFieldValuesApps/action.json +44 -0
- package/entities/IssueCustomFieldValuesApps/schema.json +20 -0
- package/entities/IssueFieldConfigurations/action.json +309 -0
- package/entities/IssueFieldConfigurations/mockdatafiles/createFieldConfiguration-default.json +5 -0
- package/entities/IssueFieldConfigurations/mockdatafiles/createFieldConfigurationScheme-default.json +5 -0
- package/entities/IssueFieldConfigurations/mockdatafiles/getAllFieldConfigurationSchemes-default.json +23 -0
- package/entities/IssueFieldConfigurations/mockdatafiles/getAllFieldConfigurations-default.json +19 -0
- package/entities/IssueFieldConfigurations/mockdatafiles/getFieldConfigurationItems-default.json +19 -0
- package/entities/IssueFieldConfigurations/mockdatafiles/getFieldConfigurationSchemeMappings-default.json +33 -0
- package/entities/IssueFieldConfigurations/mockdatafiles/getFieldConfigurationSchemeProjectMapping-default.json +26 -0
- package/entities/IssueFieldConfigurations/schema.json +33 -0
- package/entities/IssueTypeSchemes/action.json +207 -0
- package/entities/IssueTypeSchemes/mockdatafiles/createIssueTypeScheme-default.json +3 -0
- package/entities/IssueTypeSchemes/mockdatafiles/getAllIssueTypeSchemes-default.json +26 -0
- package/entities/IssueTypeSchemes/mockdatafiles/getIssueTypeSchemeForProjects-default.json +44 -0
- package/entities/IssueTypeSchemes/mockdatafiles/getIssueTypeSchemesMapping-default.json +24 -0
- package/entities/IssueTypeSchemes/schema.json +28 -0
- package/entities/IssueTypeScreenSchemes/action.json +228 -0
- package/entities/IssueTypeScreenSchemes/mockdatafiles/createIssueTypeScreenScheme-default.json +3 -0
- package/entities/IssueTypeScreenSchemes/mockdatafiles/getIssueTypeScreenSchemeMappings-default.json +28 -0
- package/entities/IssueTypeScreenSchemes/mockdatafiles/getIssueTypeScreenSchemeProjectAssociations-default.json +19 -0
- package/entities/IssueTypeScreenSchemes/mockdatafiles/getIssueTypeScreenSchemes-default.json +18 -0
- package/entities/IssueTypeScreenSchemes/mockdatafiles/getProjectsForIssueTypeScreenScheme-default.json +27 -0
- package/entities/IssueTypeScreenSchemes/schema.json +29 -0
- package/entities/Issueattachments/action.json +42 -0
- package/entities/Issueattachments/schema.json +3 -1
- package/entities/Issuefields/action.json +122 -0
- package/entities/Issuefields/mockdatafiles/getContextsForFieldDeprecated-default.json +12 -0
- package/entities/Issuefields/mockdatafiles/getFieldsPaginated-default.json +46 -0
- package/entities/Issuefields/schema.json +7 -1
- package/entities/Issueproperties/action.json +40 -0
- package/entities/Issueproperties/schema.json +3 -1
- package/entities/Issues/action.json +45 -0
- package/entities/Issues/mockdatafiles/getChangeLogsByIds-default.json +65 -0
- package/entities/Issues/mockdatafiles/getEvents-default.json +10 -0
- package/entities/Issues/schema.json +20 -0
- package/entities/Issuesearch/action.json +20 -0
- package/entities/Issuesearch/mockdatafiles/matchIssues-default.json +29 -0
- package/entities/Issuesearch/schema.json +2 -1
- package/entities/Issuesecuritylevel/action.json +21 -0
- package/entities/Issuesecuritylevel/mockdatafiles/getIssueSecurityLevelMembers-default.json +46 -0
- package/entities/Issuesecuritylevel/schema.json +2 -1
- package/entities/Issuetypes/action.json +21 -0
- package/entities/Issuetypes/mockdatafiles/getIssueTypesForProject-default.json +39 -0
- package/entities/Issuetypes/schema.json +2 -1
- package/entities/Issuewatchers/action.json +20 -0
- package/entities/Issuewatchers/mockdatafiles/getIsWatchingIssueBulk-default.json +7 -0
- package/entities/Issuewatchers/schema.json +2 -1
- package/entities/JQL/action.json +40 -0
- package/entities/JQL/mockdatafiles/getAutoCompletePost-default.json +89 -0
- package/entities/JQL/mockdatafiles/parseJqlQueries-default.json +119 -0
- package/entities/JQL/schema.json +3 -1
- package/entities/Jiraexpressions/action.json +20 -0
- package/entities/Jiraexpressions/mockdatafiles/analyseExpression-default.json +47 -0
- package/entities/Jiraexpressions/schema.json +2 -1
- package/entities/Labels/action.json +25 -0
- package/entities/Labels/mockdatafiles/getAllLabels-default.json +10 -0
- package/entities/Labels/schema.json +19 -0
- package/entities/ProjectEmail/action.json +45 -0
- package/entities/ProjectEmail/mockdatafiles/getProjectEmail-default.json +6 -0
- package/entities/ProjectEmail/schema.json +20 -0
- package/entities/ProjectFeatures/action.json +45 -0
- package/entities/ProjectFeatures/mockdatafiles/getFeaturesForProject-default.json +24 -0
- package/entities/ProjectFeatures/mockdatafiles/toggleFeatureForProject-default.json +24 -0
- package/entities/ProjectFeatures/schema.json +20 -0
- package/entities/Projects/action.json +102 -0
- package/entities/Projects/mockdatafiles/getHierarchy-default.json +50 -0
- package/entities/Projects/mockdatafiles/getRecent-default.json +50 -0
- package/entities/Projects/mockdatafiles/restore-default.json +139 -0
- package/entities/Projects/schema.json +6 -1
- package/entities/Projecttypes/action.json +21 -0
- package/entities/Projecttypes/mockdatafiles/getAllAccessibleProjectTypes-default.json +16 -0
- package/entities/Projecttypes/schema.json +2 -1
- package/entities/ScreenSchemes/action.json +85 -0
- package/entities/ScreenSchemes/mockdatafiles/createScreenScheme-default.json +3 -0
- package/entities/ScreenSchemes/mockdatafiles/getScreenSchemes-default.json +28 -0
- package/entities/ScreenSchemes/schema.json +22 -0
- package/entities/Screens/action.json +81 -0
- package/entities/Screens/mockdatafiles/createScreen-default.json +5 -0
- package/entities/Screens/mockdatafiles/getScreensForField-default.json +17 -0
- package/entities/Screens/mockdatafiles/updateScreen-default.json +5 -0
- package/entities/Screens/schema.json +5 -1
- package/entities/Users/action.json +84 -0
- package/entities/Users/mockdatafiles/getAllUsers-default.json +32 -0
- package/entities/Users/mockdatafiles/getAllUsersDefault-default.json +32 -0
- package/entities/Users/mockdatafiles/getUserEmail-default.json +1 -0
- package/entities/Users/schema.json +5 -1
- package/entities/Webhooks/action.json +106 -0
- package/entities/Webhooks/mockdatafiles/getDynamicWebhooksForApp-default.json +40 -0
- package/entities/Webhooks/mockdatafiles/getFailedWebhooks-default.json +17 -0
- package/entities/Webhooks/mockdatafiles/refreshWebhooks-default.json +3 -0
- package/entities/Webhooks/mockdatafiles/registerDynamicWebhooks-default.json +15 -0
- package/entities/Webhooks/schema.json +23 -0
- package/entities/WorkflowSchemeProjectAssociations/action.json +45 -0
- package/entities/WorkflowSchemeProjectAssociations/mockdatafiles/getWorkflowSchemeProjectAssociations-default.json +21 -0
- package/entities/WorkflowSchemeProjectAssociations/schema.json +20 -0
- package/entities/WorkflowTransitionRules/action.json +65 -0
- package/entities/WorkflowTransitionRules/mockdatafiles/deleteWorkflowTransitionRuleConfigurations-default.json +34 -0
- package/entities/WorkflowTransitionRules/mockdatafiles/getWorkflowTransitionRuleConfigurations-default.json +56 -0
- package/entities/WorkflowTransitionRules/mockdatafiles/updateWorkflowTransitionRuleConfigurations-default.json +34 -0
- package/entities/WorkflowTransitionRules/schema.json +21 -0
- package/entities/Workflows/action.json +61 -0
- package/entities/Workflows/mockdatafiles/createWorkflow-default.json +4 -0
- package/entities/Workflows/mockdatafiles/getWorkflowsPaginated-default.json +140 -0
- package/entities/Workflows/schema.json +4 -1
- package/entities/Workflowschemedrafts/action.json +20 -0
- package/entities/Workflowschemedrafts/schema.json +2 -1
- package/entities/Workflowschemes/action.json +21 -0
- package/entities/Workflowschemes/mockdatafiles/getAllWorkflowSchemes-default.json +30 -0
- package/entities/Workflowschemes/schema.json +2 -1
- package/error.json +12 -0
- package/package.json +42 -18
- package/pronghorn.json +27769 -74
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +472 -4
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +10 -0
- package/report/updateReport1615159462702.json +95 -0
- package/report/updateReport1659707107792.json +120 -0
- package/sampleProperties.json +103 -6
- package/test/integration/adapterTestBasicGet.js +85 -0
- package/test/integration/adapterTestConnectivity.js +93 -0
- package/test/integration/adapterTestIntegration.js +3633 -101
- package/test/unit/adapterBaseTestUnit.js +949 -0
- package/test/unit/adapterTestUnit.js +4766 -109
- package/utils/adapterInfo.js +206 -0
- package/utils/addAuth.js +94 -0
- package/utils/basicGet.js +50 -0
- package/utils/checkMigrate.js +63 -0
- package/utils/entitiesToDB.js +179 -0
- package/utils/findPath.js +74 -0
- package/utils/methodDocumentor.js +225 -0
- package/utils/modify.js +154 -0
- package/utils/packModificationScript.js +1 -1
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/pre-commit.sh +5 -0
- package/utils/removeHooks.js +20 -0
- package/utils/tbScript.js +184 -0
- package/utils/tbUtils.js +469 -0
- package/utils/testRunner.js +16 -16
- package/utils/troubleshootingAdapter.js +190 -0
- package/versions.json +142 -0
- package/img/adapter.png +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"updateResults": [
|
|
3
|
+
{
|
|
4
|
+
"workflowId": {
|
|
5
|
+
"name": "Workflow with one rule not updated",
|
|
6
|
+
"draft": false
|
|
7
|
+
},
|
|
8
|
+
"ruleUpdateErrors": {
|
|
9
|
+
"example-rule-id": [
|
|
10
|
+
"The rule with this id does not exist: example-rule-id"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"updateErrors": []
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"workflowId": {
|
|
17
|
+
"name": "Workflow with all rules successfully updated",
|
|
18
|
+
"draft": true
|
|
19
|
+
},
|
|
20
|
+
"ruleUpdateErrors": {},
|
|
21
|
+
"updateErrors": []
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"workflowId": {
|
|
25
|
+
"name": "Non-existing workflow",
|
|
26
|
+
"draft": false
|
|
27
|
+
},
|
|
28
|
+
"ruleUpdateErrors": {},
|
|
29
|
+
"updateErrors": [
|
|
30
|
+
"Workflow not found: WorkflowIdBean{name=Non-existing workflow, draft=false}"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"maxResults": 10,
|
|
3
|
+
"startAt": 0,
|
|
4
|
+
"total": 1,
|
|
5
|
+
"isLast": true,
|
|
6
|
+
"values": [
|
|
7
|
+
{
|
|
8
|
+
"workflowId": {
|
|
9
|
+
"name": "My Workflow name",
|
|
10
|
+
"draft": false
|
|
11
|
+
},
|
|
12
|
+
"postFunctions": [
|
|
13
|
+
{
|
|
14
|
+
"id": "b4d6cbdc-59f5-11e9-8647-d663bd873d93",
|
|
15
|
+
"key": "postfunction-key",
|
|
16
|
+
"configuration": {
|
|
17
|
+
"value": "{ \"color\": \"red\" }",
|
|
18
|
+
"disabled": false
|
|
19
|
+
},
|
|
20
|
+
"transition": {
|
|
21
|
+
"id": 1,
|
|
22
|
+
"name": "Open"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"conditions": [
|
|
27
|
+
{
|
|
28
|
+
"id": "d663bd873d93-59f5-11e9-8647-b4d6cbdc",
|
|
29
|
+
"key": "condition-key",
|
|
30
|
+
"configuration": {
|
|
31
|
+
"value": "{ \"size\": \"medium\" }",
|
|
32
|
+
"disabled": false
|
|
33
|
+
},
|
|
34
|
+
"transition": {
|
|
35
|
+
"id": 1,
|
|
36
|
+
"name": "Open"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"validators": [
|
|
41
|
+
{
|
|
42
|
+
"id": "11e9-59f5-b4d6cbdc-8647-d663bd873d93",
|
|
43
|
+
"key": "validator-key",
|
|
44
|
+
"configuration": {
|
|
45
|
+
"value": "\"{ \\\"shape\\\": \\\"square\\\" }\"",
|
|
46
|
+
"disabled": false
|
|
47
|
+
},
|
|
48
|
+
"transition": {
|
|
49
|
+
"id": 1,
|
|
50
|
+
"name": "Open"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"updateResults": [
|
|
3
|
+
{
|
|
4
|
+
"workflowId": {
|
|
5
|
+
"name": "Workflow with one rule not updated",
|
|
6
|
+
"draft": false
|
|
7
|
+
},
|
|
8
|
+
"ruleUpdateErrors": {
|
|
9
|
+
"example-rule-id": [
|
|
10
|
+
"The rule with this id does not exist: example-rule-id"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"updateErrors": []
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"workflowId": {
|
|
17
|
+
"name": "Workflow with all rules successfully updated",
|
|
18
|
+
"draft": true
|
|
19
|
+
},
|
|
20
|
+
"ruleUpdateErrors": {},
|
|
21
|
+
"updateErrors": []
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"workflowId": {
|
|
25
|
+
"name": "Non-existing workflow",
|
|
26
|
+
"draft": false
|
|
27
|
+
},
|
|
28
|
+
"ruleUpdateErrors": {},
|
|
29
|
+
"updateErrors": [
|
|
30
|
+
"Workflow not found: WorkflowIdBean{name=Non-existing workflow, draft=false}"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "schema.json",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
+
"translate": false,
|
|
6
|
+
"dynamicfields": true,
|
|
7
|
+
"properties": {
|
|
8
|
+
"ph_request_type": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "type of request (internal to adapter)",
|
|
11
|
+
"default": "",
|
|
12
|
+
"enum": [
|
|
13
|
+
"getWorkflowTransitionRuleConfigurations",
|
|
14
|
+
"updateWorkflowTransitionRuleConfigurations",
|
|
15
|
+
"deleteWorkflowTransitionRuleConfigurations"
|
|
16
|
+
],
|
|
17
|
+
"external_name": "ph_request_type"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"definitions": {}
|
|
21
|
+
}
|
|
@@ -20,6 +20,67 @@
|
|
|
20
20
|
"mockFile": ""
|
|
21
21
|
}
|
|
22
22
|
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "createWorkflow",
|
|
26
|
+
"protocol": "REST",
|
|
27
|
+
"method": "POST",
|
|
28
|
+
"entitypath": "{base_path}/{version}/workflow?{query}",
|
|
29
|
+
"requestSchema": "schema.json",
|
|
30
|
+
"responseSchema": "schema.json",
|
|
31
|
+
"timeout": 0,
|
|
32
|
+
"sendEmpty": false,
|
|
33
|
+
"requestDatatype": "JSON",
|
|
34
|
+
"responseDatatype": "JSON",
|
|
35
|
+
"headers": {},
|
|
36
|
+
"responseObjects": [
|
|
37
|
+
{
|
|
38
|
+
"type": "default",
|
|
39
|
+
"key": "",
|
|
40
|
+
"mockFile": "mockdatafiles/createWorkflow-default.json"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "getWorkflowsPaginated",
|
|
46
|
+
"protocol": "REST",
|
|
47
|
+
"method": "GET",
|
|
48
|
+
"entitypath": "{base_path}/{version}/workflow/search?{query}",
|
|
49
|
+
"requestSchema": "schema.json",
|
|
50
|
+
"responseSchema": "schema.json",
|
|
51
|
+
"timeout": 0,
|
|
52
|
+
"sendEmpty": false,
|
|
53
|
+
"sendGetBody": false,
|
|
54
|
+
"requestDatatype": "JSON",
|
|
55
|
+
"responseDatatype": "JSON",
|
|
56
|
+
"headers": {},
|
|
57
|
+
"responseObjects": [
|
|
58
|
+
{
|
|
59
|
+
"type": "default",
|
|
60
|
+
"key": "",
|
|
61
|
+
"mockFile": "mockdatafiles/getWorkflowsPaginated-default.json"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "deleteInactiveWorkflow",
|
|
67
|
+
"protocol": "REST",
|
|
68
|
+
"method": "DELETE",
|
|
69
|
+
"entitypath": "{base_path}/{version}/workflow/{pathv1}?{query}",
|
|
70
|
+
"requestSchema": "schema.json",
|
|
71
|
+
"responseSchema": "schema.json",
|
|
72
|
+
"timeout": 0,
|
|
73
|
+
"sendEmpty": false,
|
|
74
|
+
"requestDatatype": "JSON",
|
|
75
|
+
"responseDatatype": "JSON",
|
|
76
|
+
"headers": {},
|
|
77
|
+
"responseObjects": [
|
|
78
|
+
{
|
|
79
|
+
"type": "default",
|
|
80
|
+
"key": "",
|
|
81
|
+
"mockFile": ""
|
|
82
|
+
}
|
|
83
|
+
]
|
|
23
84
|
}
|
|
24
85
|
]
|
|
25
86
|
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
{
|
|
2
|
+
"maxResults": 1,
|
|
3
|
+
"startAt": 0,
|
|
4
|
+
"total": 5,
|
|
5
|
+
"isLast": false,
|
|
6
|
+
"values": [
|
|
7
|
+
{
|
|
8
|
+
"id": {
|
|
9
|
+
"name": "SCRUM Workflow",
|
|
10
|
+
"entityId": "5ed312c5-f7a6-4a78-a1f6-8ff7f307d063"
|
|
11
|
+
},
|
|
12
|
+
"description": "A workflow used for Software projects in the SCRUM methodology",
|
|
13
|
+
"transitions": [
|
|
14
|
+
{
|
|
15
|
+
"id": "5",
|
|
16
|
+
"name": "In Progress",
|
|
17
|
+
"description": "Start working on the issue.",
|
|
18
|
+
"from": [
|
|
19
|
+
"10",
|
|
20
|
+
"13"
|
|
21
|
+
],
|
|
22
|
+
"to": "14",
|
|
23
|
+
"type": "directed",
|
|
24
|
+
"screen": {
|
|
25
|
+
"id": "10000",
|
|
26
|
+
"name": "Issue screen"
|
|
27
|
+
},
|
|
28
|
+
"rules": {
|
|
29
|
+
"conditions": [
|
|
30
|
+
{
|
|
31
|
+
"type": "PermissionCondition",
|
|
32
|
+
"configuration": {
|
|
33
|
+
"permissionKey": "WORK_ON_ISSUES"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "PermissionCondition",
|
|
38
|
+
"configuration": {
|
|
39
|
+
"permissionKey": "RESOLVE_ISSUES"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"conditionsTree": {
|
|
44
|
+
"nodeType": "compound",
|
|
45
|
+
"operator": "AND",
|
|
46
|
+
"conditions": [
|
|
47
|
+
{
|
|
48
|
+
"nodeType": "simple",
|
|
49
|
+
"type": "PermissionCondition",
|
|
50
|
+
"configuration": {
|
|
51
|
+
"permissionKey": "WORK_ON_ISSUES"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"nodeType": "simple",
|
|
56
|
+
"type": "PermissionCondition",
|
|
57
|
+
"configuration": {
|
|
58
|
+
"permissionKey": "RESOLVE_ISSUES"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"validators": [
|
|
64
|
+
{
|
|
65
|
+
"type": "FieldRequiredValidator",
|
|
66
|
+
"configuration": {
|
|
67
|
+
"ignoreContext": true,
|
|
68
|
+
"errorMessage": "A custom error message",
|
|
69
|
+
"fields": [
|
|
70
|
+
"description",
|
|
71
|
+
"assignee"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"postFunctions": [
|
|
77
|
+
{
|
|
78
|
+
"type": "UpdateIssueStatusFunction"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "GenerateChangeHistoryFunction"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "FireIssueEventFunction"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"properties": {
|
|
89
|
+
"jira.fieldscreen.id": 1
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"statuses": [
|
|
94
|
+
{
|
|
95
|
+
"id": "3",
|
|
96
|
+
"name": "In Progress",
|
|
97
|
+
"properties": {
|
|
98
|
+
"jira.issue.editable": "false",
|
|
99
|
+
"issueEditable": false
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"isDefault": false,
|
|
104
|
+
"schemes": [
|
|
105
|
+
{
|
|
106
|
+
"id": "10001",
|
|
107
|
+
"name": "Test Workflow Scheme"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"projects": [
|
|
111
|
+
{
|
|
112
|
+
"self": "project/EX",
|
|
113
|
+
"id": "10000",
|
|
114
|
+
"key": "EX",
|
|
115
|
+
"name": "Example",
|
|
116
|
+
"projectTypeKey": "ProjectTypeKey{key='software'}",
|
|
117
|
+
"simplified": false,
|
|
118
|
+
"avatarUrls": {
|
|
119
|
+
"48x48": "secure/projectavatar?size=large&pid=10000",
|
|
120
|
+
"24x24": "secure/projectavatar?size=small&pid=10000",
|
|
121
|
+
"16x16": "secure/projectavatar?size=xsmall&pid=10000",
|
|
122
|
+
"32x32": "secure/projectavatar?size=medium&pid=10000"
|
|
123
|
+
},
|
|
124
|
+
"projectCategory": {
|
|
125
|
+
"id": "10000",
|
|
126
|
+
"description": "Project category description",
|
|
127
|
+
"name": "A project category"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"hasDraftWorkflow": true,
|
|
132
|
+
"operations": {
|
|
133
|
+
"canEdit": true,
|
|
134
|
+
"canDelete": false
|
|
135
|
+
},
|
|
136
|
+
"created": "2021-12-31T03:47:10.057+0000",
|
|
137
|
+
"updated": "2021-12-31T03:47:10.057+0000"
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
"description": "type of request (internal to adapter)",
|
|
11
11
|
"default": "getRestapi2workflow",
|
|
12
12
|
"enum": [
|
|
13
|
-
"getRestapi2workflow"
|
|
13
|
+
"getRestapi2workflow",
|
|
14
|
+
"createWorkflow",
|
|
15
|
+
"getWorkflowsPaginated",
|
|
16
|
+
"deleteInactiveWorkflow"
|
|
14
17
|
],
|
|
15
18
|
"external_name": "ph_request_type"
|
|
16
19
|
}
|
|
@@ -272,6 +272,26 @@
|
|
|
272
272
|
"mockFile": ""
|
|
273
273
|
}
|
|
274
274
|
]
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"name": "publishDraftWorkflowScheme",
|
|
278
|
+
"protocol": "REST",
|
|
279
|
+
"method": "POST",
|
|
280
|
+
"entitypath": "{base_path}/{version}/workflowscheme/{pathv1}/draft/publish?{query}",
|
|
281
|
+
"requestSchema": "schema.json",
|
|
282
|
+
"responseSchema": "schema.json",
|
|
283
|
+
"timeout": 0,
|
|
284
|
+
"sendEmpty": false,
|
|
285
|
+
"requestDatatype": "JSON",
|
|
286
|
+
"responseDatatype": "JSON",
|
|
287
|
+
"headers": {},
|
|
288
|
+
"responseObjects": [
|
|
289
|
+
{
|
|
290
|
+
"type": "default",
|
|
291
|
+
"key": "",
|
|
292
|
+
"mockFile": ""
|
|
293
|
+
}
|
|
294
|
+
]
|
|
275
295
|
}
|
|
276
296
|
]
|
|
277
297
|
}
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"deleteRestapi2workflowschemeiddraftissuetypeissueType",
|
|
23
23
|
"getRestapi2workflowschemeiddraftworkflow",
|
|
24
24
|
"putRestapi2workflowschemeiddraftworkflow",
|
|
25
|
-
"deleteRestapi2workflowschemeiddraftworkflow"
|
|
25
|
+
"deleteRestapi2workflowschemeiddraftworkflow",
|
|
26
|
+
"publishDraftWorkflowScheme"
|
|
26
27
|
],
|
|
27
28
|
"external_name": "ph_request_type"
|
|
28
29
|
}
|
|
@@ -272,6 +272,27 @@
|
|
|
272
272
|
"mockFile": ""
|
|
273
273
|
}
|
|
274
274
|
]
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"name": "getAllWorkflowSchemes",
|
|
278
|
+
"protocol": "REST",
|
|
279
|
+
"method": "GET",
|
|
280
|
+
"entitypath": "{base_path}/{version}/workflowscheme?{query}",
|
|
281
|
+
"requestSchema": "schema.json",
|
|
282
|
+
"responseSchema": "schema.json",
|
|
283
|
+
"timeout": 0,
|
|
284
|
+
"sendEmpty": false,
|
|
285
|
+
"sendGetBody": false,
|
|
286
|
+
"requestDatatype": "JSON",
|
|
287
|
+
"responseDatatype": "JSON",
|
|
288
|
+
"headers": {},
|
|
289
|
+
"responseObjects": [
|
|
290
|
+
{
|
|
291
|
+
"type": "default",
|
|
292
|
+
"key": "",
|
|
293
|
+
"mockFile": "mockdatafiles/getAllWorkflowSchemes-default.json"
|
|
294
|
+
}
|
|
295
|
+
]
|
|
275
296
|
}
|
|
276
297
|
]
|
|
277
298
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"maxResults": 50,
|
|
3
|
+
"startAt": 0,
|
|
4
|
+
"total": 2,
|
|
5
|
+
"isLast": true,
|
|
6
|
+
"values": [
|
|
7
|
+
{
|
|
8
|
+
"id": 101010,
|
|
9
|
+
"name": "Example workflow scheme",
|
|
10
|
+
"description": "The description of the example workflow scheme.",
|
|
11
|
+
"defaultWorkflow": "jira",
|
|
12
|
+
"issueTypeMappings": {
|
|
13
|
+
"10000": "scrum workflow",
|
|
14
|
+
"10001": "builds workflow"
|
|
15
|
+
},
|
|
16
|
+
"self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101010"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": 101011,
|
|
20
|
+
"name": "Another example workflow scheme",
|
|
21
|
+
"description": "The description of the another example workflow scheme.",
|
|
22
|
+
"defaultWorkflow": "jira",
|
|
23
|
+
"issueTypeMappings": {
|
|
24
|
+
"10000": "scrum workflow",
|
|
25
|
+
"10001": "builds workflow"
|
|
26
|
+
},
|
|
27
|
+
"self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101011"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"deleteRestapi2workflowschemeidissuetypeissueType",
|
|
23
23
|
"getRestapi2workflowschemeidworkflow",
|
|
24
24
|
"putRestapi2workflowschemeidworkflow",
|
|
25
|
-
"deleteRestapi2workflowschemeidworkflow"
|
|
25
|
+
"deleteRestapi2workflowschemeidworkflow",
|
|
26
|
+
"getAllWorkflowSchemes"
|
|
26
27
|
],
|
|
27
28
|
"external_name": "ph_request_type"
|
|
28
29
|
}
|
package/error.json
CHANGED
|
@@ -96,6 +96,12 @@
|
|
|
96
96
|
"displayString": "Invalid properties: $VARIABLE$",
|
|
97
97
|
"recommendation": "Verify the properties for the adapter"
|
|
98
98
|
},
|
|
99
|
+
{
|
|
100
|
+
"key": "Missing Properties",
|
|
101
|
+
"icode": "AD.306",
|
|
102
|
+
"displayString": "Property $VARIABLE$ is required",
|
|
103
|
+
"recommendation": "Please provide the required property"
|
|
104
|
+
},
|
|
99
105
|
{
|
|
100
106
|
"key": "Query Not Translated",
|
|
101
107
|
"icode": "AD.310",
|
|
@@ -168,6 +174,12 @@
|
|
|
168
174
|
"displayString": "Failure response received for $VARIABLE$",
|
|
169
175
|
"recommendation": "Check the reason for failure in the stack trace"
|
|
170
176
|
},
|
|
177
|
+
{
|
|
178
|
+
"key": "Suspended Adapter",
|
|
179
|
+
"icode": "AD.600",
|
|
180
|
+
"displayString": "Adapter is suspended",
|
|
181
|
+
"recommendation": "Check if external system is functional and unsuspend if appropriate"
|
|
182
|
+
},
|
|
171
183
|
{
|
|
172
184
|
"key": "Caught Exception",
|
|
173
185
|
"icode": "AD.900",
|
package/package.json
CHANGED
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-jira",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.5",
|
|
4
4
|
"description": "This adapter integrates with system Jira",
|
|
5
5
|
"main": "adapter.js",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
6
|
+
"systemName": "Atlassian Jira",
|
|
7
|
+
"wizardVersion": "2.44.7",
|
|
8
|
+
"engineVersion": "1.61.10",
|
|
9
|
+
"adapterType": "http",
|
|
8
10
|
"scripts": {
|
|
9
11
|
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
10
|
-
"preinstall": "node utils/setup.js",
|
|
12
|
+
"preinstall": "node utils/setup.js && npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions",
|
|
11
13
|
"lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
|
|
12
14
|
"lint:errors": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet",
|
|
15
|
+
"test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
|
|
13
16
|
"test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
|
|
14
17
|
"test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
|
|
15
18
|
"test:system": "nyc --reporter html --reporter text mocha test/integration/adapterTestIntegration.js --LOG=error -g \"System Integration Tests\"",
|
|
16
19
|
"test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
|
|
17
|
-
"test": "npm run test:unit && npm run test:integration",
|
|
18
|
-
"
|
|
20
|
+
"test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
|
|
21
|
+
"adapter:install": "npm i && node utils/tbScript.js install",
|
|
22
|
+
"adapter:checkMigrate": "node utils/checkMigrate.js",
|
|
23
|
+
"adapter:findPath": "node utils/findPath.js",
|
|
24
|
+
"adapter:migrate": "node utils/modify.js -m",
|
|
25
|
+
"adapter:update": "node utils/modify.js -u",
|
|
26
|
+
"adapter:revert": "node utils/modify.js -r",
|
|
27
|
+
"troubleshoot": "node utils/tbScript.js",
|
|
28
|
+
"healthcheck": "node utils/tbScript.js healthcheck",
|
|
29
|
+
"basicget": "node utils/tbScript.js basicget",
|
|
30
|
+
"connectivity": "node utils/tbScript.js connectivity",
|
|
31
|
+
"deploy": "npm publish --registry=https://registry.npmjs.org --access=public",
|
|
19
32
|
"build": "npm run deploy"
|
|
20
33
|
},
|
|
21
34
|
"keywords": [
|
|
@@ -42,22 +55,33 @@
|
|
|
42
55
|
"author": "Itential",
|
|
43
56
|
"homepage": "https://gitlab.com/itentialopensource/adapters/itsm-testing/adapter-jira.git",
|
|
44
57
|
"dependencies": {
|
|
45
|
-
"@itentialopensource/adapter-utils": "^4.
|
|
58
|
+
"@itentialopensource/adapter-utils": "^4.45.6",
|
|
46
59
|
"ajv": "^6.12.0",
|
|
60
|
+
"axios": "^0.21.0",
|
|
61
|
+
"commander": "^2.20.0",
|
|
62
|
+
"esprima": "^4.0.1",
|
|
47
63
|
"fs-extra": "^8.1.0",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
64
|
+
"json-query": "^2.2.2",
|
|
65
|
+
"mocha": "^9.0.1",
|
|
66
|
+
"mocha-param": "^2.0.1",
|
|
67
|
+
"mongodb": "^4.1.0",
|
|
68
|
+
"network-diagnostics": "^0.5.3",
|
|
69
|
+
"nyc": "^15.1.0",
|
|
70
|
+
"readline-sync": "^1.4.10",
|
|
71
|
+
"semver": "^7.3.2",
|
|
72
|
+
"winston": "^3.3.3"
|
|
50
73
|
},
|
|
51
74
|
"devDependencies": {
|
|
52
|
-
"chai": "^4.
|
|
53
|
-
"eslint": "^7.
|
|
54
|
-
"eslint-config-airbnb-base": "^14.2.
|
|
55
|
-
"eslint-plugin-import": "^2.
|
|
56
|
-
"eslint-plugin-json": "^
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
75
|
+
"chai": "^4.3.4",
|
|
76
|
+
"eslint": "^7.29.0",
|
|
77
|
+
"eslint-config-airbnb-base": "^14.2.1",
|
|
78
|
+
"eslint-plugin-import": "^2.23.4",
|
|
79
|
+
"eslint-plugin-json": "^3.0.0",
|
|
80
|
+
"package-json-validator": "^0.6.3",
|
|
81
|
+
"testdouble": "^3.16.1"
|
|
82
|
+
},
|
|
83
|
+
"resolutions": {
|
|
84
|
+
"minimist": "^1.2.5"
|
|
61
85
|
},
|
|
62
86
|
"private": false
|
|
63
87
|
}
|