How to assign id to a created issue with jira python? -


i using jira python create issues through rest api, in "fields" dictionary "project" key's dictionary, running issue when try using "id" or "name" keys, works "key" key.

so, works:

'project': {'key': 'orion'}

but, when try using other keys provided in jira-python documentation such as:

'project': {'name': 'orion-777'}

or

'project': {'id': 777}

or

'project': {'id': '777'}

it not work. getting error says:

response text = {     "errormessages": [],     "errors": {         "project": "project required"     } } 

i want specify id don't keep creating issues same bug on , over. guidance welcome. thanks!

following documentation link provided, can create issue in following ways:

new_issue = jira.create_issue(project='proj_key_or_id', summary='new issue jira-python',                               description='look one', issuetype={'name': 'bug'}) 

or

issue_dict = {     'project': {'id': 123},     'summary': 'new issue jira-python',     'description': 'look one',     'issuetype': {'name': 'bug'}, } new_issue = jira.create_issue(fields=issue_dict) 

you can project key, name or id.

to name or key, go "project settings" of project click on "details" (you need have permission see these settings).

to see id without making rest query, go again in "project settings" page mouse-over on details , can view project id in navigation bar @ bottom of browser (i.e. pid=12345)

with information should able create issue using name, key or id of project.


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -