@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.
Files changed (189) hide show
  1. package/.eslintignore +1 -0
  2. package/AUTH.md +39 -0
  3. package/BROKER.md +199 -0
  4. package/CALLS.md +7365 -0
  5. package/CHANGELOG.md +24 -0
  6. package/CODE_OF_CONDUCT.md +12 -17
  7. package/CONTRIBUTING.md +88 -74
  8. package/ENHANCE.md +69 -0
  9. package/PROPERTIES.md +641 -0
  10. package/README.md +228 -420
  11. package/SUMMARY.md +9 -0
  12. package/SYSTEMINFO.md +11 -0
  13. package/TROUBLESHOOT.md +47 -0
  14. package/adapter.js +18753 -4899
  15. package/adapterBase.js +1274 -236
  16. package/entities/.generic/action.json +214 -0
  17. package/entities/.generic/schema.json +28 -0
  18. package/entities/Avatars/action.json +63 -0
  19. package/entities/Avatars/schema.json +4 -1
  20. package/entities/Dashboards/action.json +80 -0
  21. package/entities/Dashboards/mockdatafiles/copyDashboard-default.json +13 -0
  22. package/entities/Dashboards/mockdatafiles/createDashboard-default.json +13 -0
  23. package/entities/Dashboards/mockdatafiles/updateDashboard-default.json +13 -0
  24. package/entities/Dashboards/schema.json +5 -1
  25. package/entities/Groups/action.json +21 -0
  26. package/entities/Groups/mockdatafiles/bulkGetGroups-default.json +16 -0
  27. package/entities/Groups/schema.json +2 -1
  28. package/entities/InstanceInformation/action.json +25 -0
  29. package/entities/InstanceInformation/mockdatafiles/getLicense-default.json +20 -0
  30. package/entities/InstanceInformation/schema.json +19 -0
  31. package/entities/IssueCustomFieldConfigurationApps/action.json +45 -0
  32. package/entities/IssueCustomFieldConfigurationApps/mockdatafiles/getCustomFieldConfiguration-default.json +34 -0
  33. package/entities/IssueCustomFieldConfigurationApps/schema.json +20 -0
  34. package/entities/IssueCustomFieldContexts/action.json +268 -0
  35. package/entities/IssueCustomFieldContexts/mockdatafiles/createCustomFieldContext-default.json +9 -0
  36. package/entities/IssueCustomFieldContexts/mockdatafiles/getContextsForField-default.json +22 -0
  37. package/entities/IssueCustomFieldContexts/mockdatafiles/getCustomFieldContextsForProjectsAndIssueTypes-default.json +23 -0
  38. package/entities/IssueCustomFieldContexts/mockdatafiles/getDefaultValues-default.json +22 -0
  39. package/entities/IssueCustomFieldContexts/mockdatafiles/getIssueTypeMappingsForContexts-default.json +20 -0
  40. package/entities/IssueCustomFieldContexts/mockdatafiles/getProjectContextMapping-default.json +16 -0
  41. package/entities/IssueCustomFieldContexts/schema.json +31 -0
  42. package/entities/IssueCustomFieldOptions/action.json +105 -0
  43. package/entities/IssueCustomFieldOptions/mockdatafiles/createCustomFieldOption-default.json +20 -0
  44. package/entities/IssueCustomFieldOptions/mockdatafiles/getOptionsForContext-default.json +26 -0
  45. package/entities/IssueCustomFieldOptions/mockdatafiles/updateCustomFieldOption-default.json +19 -0
  46. package/entities/IssueCustomFieldOptions/schema.json +23 -0
  47. package/entities/IssueCustomFieldValuesApps/action.json +44 -0
  48. package/entities/IssueCustomFieldValuesApps/schema.json +20 -0
  49. package/entities/IssueFieldConfigurations/action.json +309 -0
  50. package/entities/IssueFieldConfigurations/mockdatafiles/createFieldConfiguration-default.json +5 -0
  51. package/entities/IssueFieldConfigurations/mockdatafiles/createFieldConfigurationScheme-default.json +5 -0
  52. package/entities/IssueFieldConfigurations/mockdatafiles/getAllFieldConfigurationSchemes-default.json +23 -0
  53. package/entities/IssueFieldConfigurations/mockdatafiles/getAllFieldConfigurations-default.json +19 -0
  54. package/entities/IssueFieldConfigurations/mockdatafiles/getFieldConfigurationItems-default.json +19 -0
  55. package/entities/IssueFieldConfigurations/mockdatafiles/getFieldConfigurationSchemeMappings-default.json +33 -0
  56. package/entities/IssueFieldConfigurations/mockdatafiles/getFieldConfigurationSchemeProjectMapping-default.json +26 -0
  57. package/entities/IssueFieldConfigurations/schema.json +33 -0
  58. package/entities/IssueTypeSchemes/action.json +207 -0
  59. package/entities/IssueTypeSchemes/mockdatafiles/createIssueTypeScheme-default.json +3 -0
  60. package/entities/IssueTypeSchemes/mockdatafiles/getAllIssueTypeSchemes-default.json +26 -0
  61. package/entities/IssueTypeSchemes/mockdatafiles/getIssueTypeSchemeForProjects-default.json +44 -0
  62. package/entities/IssueTypeSchemes/mockdatafiles/getIssueTypeSchemesMapping-default.json +24 -0
  63. package/entities/IssueTypeSchemes/schema.json +28 -0
  64. package/entities/IssueTypeScreenSchemes/action.json +228 -0
  65. package/entities/IssueTypeScreenSchemes/mockdatafiles/createIssueTypeScreenScheme-default.json +3 -0
  66. package/entities/IssueTypeScreenSchemes/mockdatafiles/getIssueTypeScreenSchemeMappings-default.json +28 -0
  67. package/entities/IssueTypeScreenSchemes/mockdatafiles/getIssueTypeScreenSchemeProjectAssociations-default.json +19 -0
  68. package/entities/IssueTypeScreenSchemes/mockdatafiles/getIssueTypeScreenSchemes-default.json +18 -0
  69. package/entities/IssueTypeScreenSchemes/mockdatafiles/getProjectsForIssueTypeScreenScheme-default.json +27 -0
  70. package/entities/IssueTypeScreenSchemes/schema.json +29 -0
  71. package/entities/Issueattachments/action.json +42 -0
  72. package/entities/Issueattachments/schema.json +3 -1
  73. package/entities/Issuefields/action.json +122 -0
  74. package/entities/Issuefields/mockdatafiles/getContextsForFieldDeprecated-default.json +12 -0
  75. package/entities/Issuefields/mockdatafiles/getFieldsPaginated-default.json +46 -0
  76. package/entities/Issuefields/schema.json +7 -1
  77. package/entities/Issueproperties/action.json +40 -0
  78. package/entities/Issueproperties/schema.json +3 -1
  79. package/entities/Issues/action.json +45 -0
  80. package/entities/Issues/mockdatafiles/getChangeLogsByIds-default.json +65 -0
  81. package/entities/Issues/mockdatafiles/getEvents-default.json +10 -0
  82. package/entities/Issues/schema.json +20 -0
  83. package/entities/Issuesearch/action.json +20 -0
  84. package/entities/Issuesearch/mockdatafiles/matchIssues-default.json +29 -0
  85. package/entities/Issuesearch/schema.json +2 -1
  86. package/entities/Issuesecuritylevel/action.json +21 -0
  87. package/entities/Issuesecuritylevel/mockdatafiles/getIssueSecurityLevelMembers-default.json +46 -0
  88. package/entities/Issuesecuritylevel/schema.json +2 -1
  89. package/entities/Issuetypes/action.json +21 -0
  90. package/entities/Issuetypes/mockdatafiles/getIssueTypesForProject-default.json +39 -0
  91. package/entities/Issuetypes/schema.json +2 -1
  92. package/entities/Issuewatchers/action.json +20 -0
  93. package/entities/Issuewatchers/mockdatafiles/getIsWatchingIssueBulk-default.json +7 -0
  94. package/entities/Issuewatchers/schema.json +2 -1
  95. package/entities/JQL/action.json +40 -0
  96. package/entities/JQL/mockdatafiles/getAutoCompletePost-default.json +89 -0
  97. package/entities/JQL/mockdatafiles/parseJqlQueries-default.json +119 -0
  98. package/entities/JQL/schema.json +3 -1
  99. package/entities/Jiraexpressions/action.json +20 -0
  100. package/entities/Jiraexpressions/mockdatafiles/analyseExpression-default.json +47 -0
  101. package/entities/Jiraexpressions/schema.json +2 -1
  102. package/entities/Labels/action.json +25 -0
  103. package/entities/Labels/mockdatafiles/getAllLabels-default.json +10 -0
  104. package/entities/Labels/schema.json +19 -0
  105. package/entities/ProjectEmail/action.json +45 -0
  106. package/entities/ProjectEmail/mockdatafiles/getProjectEmail-default.json +6 -0
  107. package/entities/ProjectEmail/schema.json +20 -0
  108. package/entities/ProjectFeatures/action.json +45 -0
  109. package/entities/ProjectFeatures/mockdatafiles/getFeaturesForProject-default.json +24 -0
  110. package/entities/ProjectFeatures/mockdatafiles/toggleFeatureForProject-default.json +24 -0
  111. package/entities/ProjectFeatures/schema.json +20 -0
  112. package/entities/Projects/action.json +102 -0
  113. package/entities/Projects/mockdatafiles/getHierarchy-default.json +50 -0
  114. package/entities/Projects/mockdatafiles/getRecent-default.json +50 -0
  115. package/entities/Projects/mockdatafiles/restore-default.json +139 -0
  116. package/entities/Projects/schema.json +6 -1
  117. package/entities/Projecttypes/action.json +21 -0
  118. package/entities/Projecttypes/mockdatafiles/getAllAccessibleProjectTypes-default.json +16 -0
  119. package/entities/Projecttypes/schema.json +2 -1
  120. package/entities/ScreenSchemes/action.json +85 -0
  121. package/entities/ScreenSchemes/mockdatafiles/createScreenScheme-default.json +3 -0
  122. package/entities/ScreenSchemes/mockdatafiles/getScreenSchemes-default.json +28 -0
  123. package/entities/ScreenSchemes/schema.json +22 -0
  124. package/entities/Screens/action.json +81 -0
  125. package/entities/Screens/mockdatafiles/createScreen-default.json +5 -0
  126. package/entities/Screens/mockdatafiles/getScreensForField-default.json +17 -0
  127. package/entities/Screens/mockdatafiles/updateScreen-default.json +5 -0
  128. package/entities/Screens/schema.json +5 -1
  129. package/entities/Users/action.json +84 -0
  130. package/entities/Users/mockdatafiles/getAllUsers-default.json +32 -0
  131. package/entities/Users/mockdatafiles/getAllUsersDefault-default.json +32 -0
  132. package/entities/Users/mockdatafiles/getUserEmail-default.json +1 -0
  133. package/entities/Users/schema.json +5 -1
  134. package/entities/Webhooks/action.json +106 -0
  135. package/entities/Webhooks/mockdatafiles/getDynamicWebhooksForApp-default.json +40 -0
  136. package/entities/Webhooks/mockdatafiles/getFailedWebhooks-default.json +17 -0
  137. package/entities/Webhooks/mockdatafiles/refreshWebhooks-default.json +3 -0
  138. package/entities/Webhooks/mockdatafiles/registerDynamicWebhooks-default.json +15 -0
  139. package/entities/Webhooks/schema.json +23 -0
  140. package/entities/WorkflowSchemeProjectAssociations/action.json +45 -0
  141. package/entities/WorkflowSchemeProjectAssociations/mockdatafiles/getWorkflowSchemeProjectAssociations-default.json +21 -0
  142. package/entities/WorkflowSchemeProjectAssociations/schema.json +20 -0
  143. package/entities/WorkflowTransitionRules/action.json +65 -0
  144. package/entities/WorkflowTransitionRules/mockdatafiles/deleteWorkflowTransitionRuleConfigurations-default.json +34 -0
  145. package/entities/WorkflowTransitionRules/mockdatafiles/getWorkflowTransitionRuleConfigurations-default.json +56 -0
  146. package/entities/WorkflowTransitionRules/mockdatafiles/updateWorkflowTransitionRuleConfigurations-default.json +34 -0
  147. package/entities/WorkflowTransitionRules/schema.json +21 -0
  148. package/entities/Workflows/action.json +61 -0
  149. package/entities/Workflows/mockdatafiles/createWorkflow-default.json +4 -0
  150. package/entities/Workflows/mockdatafiles/getWorkflowsPaginated-default.json +140 -0
  151. package/entities/Workflows/schema.json +4 -1
  152. package/entities/Workflowschemedrafts/action.json +20 -0
  153. package/entities/Workflowschemedrafts/schema.json +2 -1
  154. package/entities/Workflowschemes/action.json +21 -0
  155. package/entities/Workflowschemes/mockdatafiles/getAllWorkflowSchemes-default.json +30 -0
  156. package/entities/Workflowschemes/schema.json +2 -1
  157. package/error.json +12 -0
  158. package/package.json +42 -18
  159. package/pronghorn.json +27769 -74
  160. package/propertiesDecorators.json +14 -0
  161. package/propertiesSchema.json +472 -4
  162. package/refs?service=git-upload-pack +0 -0
  163. package/report/adapterInfo.json +10 -0
  164. package/report/updateReport1615159462702.json +95 -0
  165. package/report/updateReport1659707107792.json +120 -0
  166. package/sampleProperties.json +103 -6
  167. package/test/integration/adapterTestBasicGet.js +85 -0
  168. package/test/integration/adapterTestConnectivity.js +93 -0
  169. package/test/integration/adapterTestIntegration.js +3633 -101
  170. package/test/unit/adapterBaseTestUnit.js +949 -0
  171. package/test/unit/adapterTestUnit.js +4766 -109
  172. package/utils/adapterInfo.js +206 -0
  173. package/utils/addAuth.js +94 -0
  174. package/utils/basicGet.js +50 -0
  175. package/utils/checkMigrate.js +63 -0
  176. package/utils/entitiesToDB.js +179 -0
  177. package/utils/findPath.js +74 -0
  178. package/utils/methodDocumentor.js +225 -0
  179. package/utils/modify.js +154 -0
  180. package/utils/packModificationScript.js +1 -1
  181. package/utils/patches2bundledDeps.js +90 -0
  182. package/utils/pre-commit.sh +5 -0
  183. package/utils/removeHooks.js +20 -0
  184. package/utils/tbScript.js +184 -0
  185. package/utils/tbUtils.js +469 -0
  186. package/utils/testRunner.js +16 -16
  187. package/utils/troubleshootingAdapter.js +190 -0
  188. package/versions.json +142 -0
  189. package/img/adapter.png +0 -0
@@ -146,6 +146,27 @@
146
146
  "mockFile": "mockdatafiles/postRestapi2issuetypeidavatar2-default.json"
147
147
  }
148
148
  ]
149
+ },
150
+ {
151
+ "name": "getIssueTypesForProject",
152
+ "protocol": "REST",
153
+ "method": "GET",
154
+ "entitypath": "{base_path}/{version}/issuetype/project?{query}",
155
+ "requestSchema": "schema.json",
156
+ "responseSchema": "schema.json",
157
+ "timeout": 0,
158
+ "sendEmpty": false,
159
+ "sendGetBody": false,
160
+ "requestDatatype": "JSON",
161
+ "responseDatatype": "JSON",
162
+ "headers": {},
163
+ "responseObjects": [
164
+ {
165
+ "type": "default",
166
+ "key": "",
167
+ "mockFile": "mockdatafiles/getIssueTypesForProject-default.json"
168
+ }
169
+ ]
149
170
  }
150
171
  ]
151
172
  }
@@ -0,0 +1,39 @@
1
+ [
2
+ {
3
+ "self": "https://your-domain.atlassian.net/rest/api/3/issueType/1",
4
+ "id": "1",
5
+ "description": "A problem with the software.",
6
+ "iconUrl": "https://your-domain.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10316&avatarType=issuetype\",",
7
+ "name": "Bug",
8
+ "subtask": false,
9
+ "avatarId": 10002,
10
+ "entityId": "9d7dd6f7-e8b6-4247-954b-7b2c9b2a5ba2",
11
+ "hierarchyLevel": 0,
12
+ "scope": {
13
+ "type": "PROJECT",
14
+ "project": {
15
+ "id": "10000",
16
+ "key": "KEY",
17
+ "name": "Next Gen Project"
18
+ }
19
+ }
20
+ },
21
+ {
22
+ "self": "https://your-domain.atlassian.net/rest/api/3/issueType/3",
23
+ "id": "3",
24
+ "description": "A task that needs to be done.",
25
+ "iconUrl": "https://your-domain.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10299&avatarType=issuetype\",",
26
+ "name": "Task",
27
+ "subtask": false,
28
+ "avatarId": 1,
29
+ "hierarchyLevel": 0,
30
+ "scope": {
31
+ "type": "PROJECT",
32
+ "project": {
33
+ "id": "10000",
34
+ "key": "KEY",
35
+ "name": "Next Gen Project"
36
+ }
37
+ }
38
+ }
39
+ ]
@@ -16,7 +16,8 @@
16
16
  "putRestapi2issuetypeid",
17
17
  "deleteRestapi2issuetypeid",
18
18
  "getRestapi2issuetypeidalternatives",
19
- "postRestapi2issuetypeidavatar2"
19
+ "postRestapi2issuetypeidavatar2",
20
+ "getIssueTypesForProject"
20
21
  ],
21
22
  "external_name": "ph_request_type"
22
23
  }
@@ -62,6 +62,26 @@
62
62
  "mockFile": ""
63
63
  }
64
64
  ]
65
+ },
66
+ {
67
+ "name": "getIsWatchingIssueBulk",
68
+ "protocol": "REST",
69
+ "method": "POST",
70
+ "entitypath": "{base_path}/{version}/issue/watching?{query}",
71
+ "requestSchema": "schema.json",
72
+ "responseSchema": "schema.json",
73
+ "timeout": 0,
74
+ "sendEmpty": false,
75
+ "requestDatatype": "JSON",
76
+ "responseDatatype": "JSON",
77
+ "headers": {},
78
+ "responseObjects": [
79
+ {
80
+ "type": "default",
81
+ "key": "",
82
+ "mockFile": "mockdatafiles/getIsWatchingIssueBulk-default.json"
83
+ }
84
+ ]
65
85
  }
66
86
  ]
67
87
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "issuesIsWatching": {
3
+ "10001": true,
4
+ "10002": false,
5
+ "10005": true
6
+ }
7
+ }
@@ -12,7 +12,8 @@
12
12
  "enum": [
13
13
  "getRestapi2issueissueIdOrKeywatchers",
14
14
  "postRestapi2issueissueIdOrKeywatchers",
15
- "deleteRestapi2issueissueIdOrKeywatchers"
15
+ "deleteRestapi2issueissueIdOrKeywatchers",
16
+ "getIsWatchingIssueBulk"
16
17
  ],
17
18
  "external_name": "ph_request_type"
18
19
  }
@@ -62,6 +62,46 @@
62
62
  "mockFile": "mockdatafiles/postRestapi2jqlpdcleaner-default.json"
63
63
  }
64
64
  ]
65
+ },
66
+ {
67
+ "name": "getAutoCompletePost",
68
+ "protocol": "REST",
69
+ "method": "POST",
70
+ "entitypath": "{base_path}/{version}/jql/autocompletedata?{query}",
71
+ "requestSchema": "schema.json",
72
+ "responseSchema": "schema.json",
73
+ "timeout": 0,
74
+ "sendEmpty": false,
75
+ "requestDatatype": "JSON",
76
+ "responseDatatype": "JSON",
77
+ "headers": {},
78
+ "responseObjects": [
79
+ {
80
+ "type": "default",
81
+ "key": "",
82
+ "mockFile": "mockdatafiles/getAutoCompletePost-default.json"
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ "name": "parseJqlQueries",
88
+ "protocol": "REST",
89
+ "method": "POST",
90
+ "entitypath": "{base_path}/{version}/jql/parse?{query}",
91
+ "requestSchema": "schema.json",
92
+ "responseSchema": "schema.json",
93
+ "timeout": 0,
94
+ "sendEmpty": false,
95
+ "requestDatatype": "JSON",
96
+ "responseDatatype": "JSON",
97
+ "headers": {},
98
+ "responseObjects": [
99
+ {
100
+ "type": "default",
101
+ "key": "",
102
+ "mockFile": "mockdatafiles/parseJqlQueries-default.json"
103
+ }
104
+ ]
65
105
  }
66
106
  ]
67
107
  }
@@ -0,0 +1,89 @@
1
+ {
2
+ "visibleFieldNames": [
3
+ {
4
+ "value": "summary",
5
+ "displayName": "summary",
6
+ "orderable": "true",
7
+ "searchable": "true",
8
+ "operators": [
9
+ "~",
10
+ "!~",
11
+ "is",
12
+ "is not"
13
+ ],
14
+ "types": [
15
+ "java.lang.String"
16
+ ]
17
+ },
18
+ {
19
+ "value": "cf[10061]",
20
+ "displayName": "Component - cf[10061]",
21
+ "orderable": "true",
22
+ "auto": "true",
23
+ "cfid": "cf[10061]",
24
+ "operators": [
25
+ "=",
26
+ "!=",
27
+ "in",
28
+ "not in",
29
+ "is",
30
+ "is not"
31
+ ],
32
+ "types": [
33
+ "com.atlassian.jira.issue.customfields.option.Option"
34
+ ]
35
+ },
36
+ {
37
+ "value": "cf[10062]",
38
+ "displayName": "Component - cf[10062]",
39
+ "orderable": "true",
40
+ "auto": "true",
41
+ "cfid": "cf[10062]",
42
+ "operators": [
43
+ "=",
44
+ "!=",
45
+ "in",
46
+ "not in",
47
+ "is",
48
+ "is not"
49
+ ],
50
+ "types": [
51
+ "com.atlassian.jira.issue.customfields.option.Option"
52
+ ]
53
+ },
54
+ {
55
+ "value": "\"Component[Dropdown]\"",
56
+ "displayName": "Component - Component[Dropdown]",
57
+ "searchable": "true",
58
+ "auto": "true",
59
+ "operators": [
60
+ "=",
61
+ "!=",
62
+ "in",
63
+ "not in",
64
+ "is",
65
+ "is not"
66
+ ],
67
+ "types": [
68
+ "com.atlassian.jira.issue.customfields.option.Option"
69
+ ]
70
+ }
71
+ ],
72
+ "visibleFunctionNames": [
73
+ {
74
+ "value": "standardIssueTypes()",
75
+ "displayName": "standardIssueTypes()",
76
+ "isList": "true",
77
+ "types": [
78
+ "com.atlassian.jira.issue.issuetype.IssueType"
79
+ ]
80
+ }
81
+ ],
82
+ "jqlReservedWords": [
83
+ "empty",
84
+ "and",
85
+ "or",
86
+ "in",
87
+ "distinct"
88
+ ]
89
+ }
@@ -0,0 +1,119 @@
1
+ {
2
+ "queries": [
3
+ {
4
+ "query": "summary ~ test AND (labels in (urgent, blocker) OR lastCommentedBy = currentUser()) AND status CHANGED AFTER -5d ORDER BY updated DESC",
5
+ "structure": {
6
+ "where": {
7
+ "clauses": [
8
+ {
9
+ "field": {
10
+ "name": "summary"
11
+ },
12
+ "operator": "~",
13
+ "operand": {
14
+ "value": "test"
15
+ }
16
+ },
17
+ {
18
+ "clauses": [
19
+ {
20
+ "field": {
21
+ "name": "labels"
22
+ },
23
+ "operator": "in",
24
+ "operand": {
25
+ "values": [
26
+ {
27
+ "value": "urgent"
28
+ },
29
+ {
30
+ "value": "blocker"
31
+ }
32
+ ]
33
+ }
34
+ },
35
+ {
36
+ "field": {
37
+ "name": "lastCommentedBy",
38
+ "property": [
39
+ {
40
+ "entity": "issue",
41
+ "key": "propertyKey",
42
+ "path": "path.in.property",
43
+ "type": "user"
44
+ }
45
+ ]
46
+ },
47
+ "operator": "=",
48
+ "operand": {
49
+ "function": "currentUser",
50
+ "arguments": []
51
+ }
52
+ }
53
+ ],
54
+ "operator": "or"
55
+ },
56
+ {
57
+ "field": {
58
+ "name": "status"
59
+ },
60
+ "operator": "changed",
61
+ "predicates": [
62
+ {
63
+ "operator": "after",
64
+ "operand": {
65
+ "function": "startOfMonth",
66
+ "arguments": [
67
+ "-1M"
68
+ ]
69
+ }
70
+ }
71
+ ]
72
+ }
73
+ ],
74
+ "operator": "and"
75
+ },
76
+ "orderBy": {
77
+ "fields": [
78
+ {
79
+ "field": {
80
+ "name": "updated"
81
+ },
82
+ "direction": "desc"
83
+ }
84
+ ]
85
+ }
86
+ }
87
+ },
88
+ {
89
+ "query": "invalid query",
90
+ "errors": [
91
+ "Error in the JQL Query: Expecting operator but got 'query'. The valid operators are '=', '!=', '<', '>', '<=', '>=', '~', '!~', 'IN', 'NOT IN', 'IS' and 'IS NOT'. (line 1, character 9)"
92
+ ]
93
+ },
94
+ {
95
+ "query": "summary = test",
96
+ "errors": [
97
+ "The operator '=' is not supported by the 'summary' field."
98
+ ]
99
+ },
100
+ {
101
+ "query": "summary in test",
102
+ "errors": [
103
+ "Operator 'in' does not support the non-list value '\"test\"' for field 'summary'."
104
+ ]
105
+ },
106
+ {
107
+ "query": "project = INVALID",
108
+ "errors": [
109
+ "The value 'INVALID' does not exist for the field 'project'."
110
+ ]
111
+ },
112
+ {
113
+ "query": "universe = 42",
114
+ "errors": [
115
+ "Field 'universe' does not exist or you do not have permission to view it."
116
+ ]
117
+ }
118
+ ]
119
+ }
@@ -12,7 +12,9 @@
12
12
  "enum": [
13
13
  "getRestapi2jqlautocompletedata",
14
14
  "getRestapi2jqlautocompletedatasuggestions",
15
- "postRestapi2jqlpdcleaner"
15
+ "postRestapi2jqlpdcleaner",
16
+ "getAutoCompletePost",
17
+ "parseJqlQueries"
16
18
  ],
17
19
  "external_name": "ph_request_type"
18
20
  }
@@ -20,6 +20,26 @@
20
20
  "mockFile": "mockdatafiles/postRestapi2expressioneval-default.json"
21
21
  }
22
22
  ]
23
+ },
24
+ {
25
+ "name": "analyseExpression",
26
+ "protocol": "REST",
27
+ "method": "POST",
28
+ "entitypath": "{base_path}/{version}/expression/analyse?{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/analyseExpression-default.json"
41
+ }
42
+ ]
23
43
  }
24
44
  ]
25
45
  }
@@ -0,0 +1,47 @@
1
+ {
2
+ "results": [
3
+ {
4
+ "expression": "analysed expression",
5
+ "errors": [
6
+ {
7
+ "line": 1,
8
+ "column": 4,
9
+ "message": "!, -, typeof, (, IDENTIFIER, null, true, false, NUMBER, STRING, TEMPLATE_LITERAL, new, [ or { expected, > encountered.",
10
+ "type": "syntax"
11
+ },
12
+ {
13
+ "message": "Jira expression is too long (1040), limit: 1000 characters",
14
+ "type": "other"
15
+ },
16
+ {
17
+ "message": "Jira expression has too many nodes (150), limit: 100 leaves",
18
+ "type": "other"
19
+ }
20
+ ],
21
+ "valid": false
22
+ },
23
+ {
24
+ "expression": "issues.map(i => {idAndKey: [i.id, i.key], summary: i.summary, comments: i.comments})",
25
+ "valid": true,
26
+ "type": "List<{idAndKey: [Number, String], summary: String, comments: List<Comment>}>",
27
+ "complexity": {
28
+ "expensiveOperations": "N",
29
+ "variables": {
30
+ "N": "issues"
31
+ }
32
+ }
33
+ },
34
+ {
35
+ "expression": "issues.map(i => i.id > '0')",
36
+ "errors": [
37
+ {
38
+ "expression": "i.id > 0",
39
+ "message": "Can't compare Number to String.",
40
+ "type": "type"
41
+ }
42
+ ],
43
+ "valid": false,
44
+ "type": "TypeError"
45
+ }
46
+ ]
47
+ }
@@ -10,7 +10,8 @@
10
10
  "description": "type of request (internal to adapter)",
11
11
  "default": "postRestapi2expressioneval",
12
12
  "enum": [
13
- "postRestapi2expressioneval"
13
+ "postRestapi2expressioneval",
14
+ "analyseExpression"
14
15
  ],
15
16
  "external_name": "ph_request_type"
16
17
  }
@@ -0,0 +1,25 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "getAllLabels",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/label?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": "mockdatafiles/getAllLabels-default.json"
21
+ }
22
+ ]
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "maxResults": 2,
3
+ "startAt": 0,
4
+ "total": 100,
5
+ "isLast": false,
6
+ "values": [
7
+ "performance",
8
+ "security"
9
+ ]
10
+ }
@@ -0,0 +1,19 @@
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
+ "getAllLabels"
14
+ ],
15
+ "external_name": "ph_request_type"
16
+ }
17
+ },
18
+ "definitions": {}
19
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "getProjectEmail",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/project/{pathv1}/email?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": "mockdatafiles/getProjectEmail-default.json"
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "updateProjectEmail",
26
+ "protocol": "REST",
27
+ "method": "PUT",
28
+ "entitypath": "{base_path}/{version}/project/{pathv1}/email?{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": ""
41
+ }
42
+ ]
43
+ }
44
+ ]
45
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "emailAddress": "jira@example.customdomain.com",
3
+ "emailAddressStatus": [
4
+ "Email address or domain not verified."
5
+ ]
6
+ }
@@ -0,0 +1,20 @@
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
+ "getProjectEmail",
14
+ "updateProjectEmail"
15
+ ],
16
+ "external_name": "ph_request_type"
17
+ }
18
+ },
19
+ "definitions": {}
20
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "getFeaturesForProject",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/project/{pathv1}/features?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": "mockdatafiles/getFeaturesForProject-default.json"
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "toggleFeatureForProject",
26
+ "protocol": "REST",
27
+ "method": "PUT",
28
+ "entitypath": "{base_path}/{version}/project/{pathv1}/features/{pathv2}?{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/toggleFeatureForProject-default.json"
41
+ }
42
+ ]
43
+ }
44
+ ]
45
+ }