Hello everyone,
Using Jira integration App, I am able to create an issue(of Type task), based on an action on resilient task.
I need to be able to create a sub task, whether under existing task on jira, or Create new task with its associated subtasks.
I tried to send a request similar to below, in the preprocessing script, but it failed, I formatted it into the dic inside the "inputs.jira field", where parent is the current exisiting task, and I am selecting jira issue type as "Sub-task" as per the jira type name.
but "parent" object was not recognized, I added parent to the client.py of that integration, on the create issue function as per below, but still getting errors for the "parent" like below.
Error msg.
Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/fn_jira/components/jira_open_issue.py", line 63, in _jira_open_issue_function jira_issue = jira_client.create_issue(fields=jira_fields) File "/usr/local/lib/python2.7/site-packages/jira/client.py", line 1102, in create_issue p = data['fields']['parent'] KeyError: u'parent'
client.py edits.p = data['fields']['parent']
if isinstance(p, string_types) or isinstance(p, integer_types):
data['fields']['parent'] = {'id': self.parent(p).id}
Example from Jira APIs to create sub task.
{
"fields":
{
"project":
{
"key": "TEST"
},
"parent":
{
"key": "TEST-101"
},
"summary": "Sub-task of TEST-101",
"description": "Don't forget to do this too.",
"issuetype":
{
"id": "5"
}
}
}
I am not sure if I need to define that parent object in the resources.py as well or any other py file with this integration, or It is something else?
Appreciate your support.
------------------------------
ahmed abushanab
------------------------------