Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create a new ticket with fields from an existing ticket

ABCD October 3, 2018

Hi,

I am trying to create a new ticket from an existing ticket. (similar to cloning but I dont want the history to appear)

Im using Jira-Python REST handle for this and did this so far.

jira = JIRA(options=jira_options, basic_auth=credentials)
issue = jira.issue('CT-72836')
t = issue.fields
newissue= jira.create_issue(fields=t)

But im thrown with this traceback. I even tried to cast t in to a dict but that didnt work either.
Is there any possible way of getting this done without a plugin

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\AppData\Local\Continuum\Anaconda2\lib\site-packages\jira\client.py", line 1077, in create_issue
p = data['fields']['project']
TypeError: 'type' object has no attribute '__getitem__'
>>> newissue= jira.create_issue(t)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Continuum\Anaconda2\lib\site-packages\jira\client.py", line 1077, in create_issue
p = data['fields']['project']
TypeError: 'type' object has no attribute '__getitem__'

1 answer

0 votes
Gonchik Tsymzhitov
Community Champion
January 28, 2021

Hi! 

better to raise into github issues of that wrapper I think so

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events