Skip to content

Commit 0f260e8

Browse files
committed
porting changes to recipe
1 parent c153126 commit 0f260e8

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

custom-recipes/jira-services/recipe.json

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@
7272
},
7373
{
7474
"value": "search",
75-
"label": "Core: Search issues"
75+
"label": "Core: Search issues (Deprecated)"
76+
},
77+
{
78+
"value": "search/jql",
79+
"label": "Core: Search issues (JQL)"
7680
},
7781
{
7882
"value": "project/versions",
@@ -166,7 +170,7 @@
166170
"columnRole": "input_datasets_name",
167171
"description": "Name of the column containing the JQL search strings",
168172
"mandatory": true,
169-
"visibilityCondition": "model.endpoint_name== 'search'"
173+
"visibilityCondition": "model.endpoint_name== 'search' || model.endpoint_name== 'search/jql'"
170174
},
171175
{
172176
"name": "id_column_name",
@@ -232,7 +236,7 @@
232236
"name": "expand",
233237
"label": "Expand",
234238
"type": "MULTISELECT",
235-
"visibilityCondition": "['search', 'board/issue', 'epic/none/issue'].indexOf(model.endpoint_name) >= 0",
239+
"visibilityCondition": "['search', 'search/jql', 'board/issue', 'epic/none/issue'].indexOf(model.endpoint_name) >= 0",
236240
"selectChoices": [
237241
{"value": "changelog", "label": "Change logs"},
238242
{"value": "renderedFields", "label": "Rendered fields"},
@@ -264,6 +268,18 @@
264268
{"value": "issuesstatus", "label": "Issue status"},
265269
{"value": "operations", "label": "Operations"}
266270
]
271+
},
272+
{
273+
"name": "fields",
274+
"label": "Fields",
275+
"type": "MULTISELECT",
276+
"visibilityCondition": "['search/jql'].indexOf(model.endpoint_name) >= 0",
277+
"selectChoices": [
278+
{"value": "*all", "label": "All"},
279+
{"value": "summary", "label": "Summary"},
280+
{"value": "comment", "label": "Comments"},
281+
{"value": "description", "label": "Description"}
282+
]
267283
}
268284
],
269285
"resourceKeys": []

custom-recipes/jira-services/recipe.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
queue_id_column_name = config.get('queue_id_column_name', None)
1717
de_float_column(id_list_df, queue_id_column_name)
1818

19-
access_type = get_recipe_config()['access_type']
20-
connection_details = get_recipe_config()[access_type]
21-
endpoint_name = get_recipe_config()['endpoint_name']
22-
expand = get_recipe_config()['expand']
19+
access_type = config.get('access_type')
20+
connection_details = config.get(access_type)
21+
endpoint_name = config.get('endpoint_name')
22+
expand = config.get('expand')
23+
fields = config.get('fields')
2324

2425
client = JiraClient(connection_details)
2526
client.start_session(endpoint_name)
@@ -36,7 +37,7 @@
3637
else:
3738
queue_id = None
3839

39-
data = client.get_endpoint(endpoint_name, jira_id, "", expand=expand, raise_exception=False, queue_id=queue_id)
40+
data = client.get_endpoint(endpoint_name, jira_id, "", expand=expand, fields=fields, raise_exception=False, queue_id=queue_id)
4041
while len(data) > 0:
4142
for result in data:
4243
record = dict(indexes_columns)

0 commit comments

Comments
 (0)