1

Im new to python and trying to create simple script that will creates new issue in JIRA.

Not sure what's wrong in my code.

from jira.client import JIRA


options={'server': 'https://jira.my_jira.com'}

jira=JIRA(options,basic_auth=('user', 'pass'))


root_dict = {

'project' : { 'key': 'project_name' },

'summary' : 'Test auto created issue',

'description' : 'Ignore this. will be deleted shortly',

'issuetype' : { 'name' : 'Task' },

}

my_issue= jira.create_issue(fields=root_dict)

The error is gives

JIRAError: HTTP 400: "Account is required." https://jira.my_jira.com/rest/api/2/issue

Could someone advice what's wrong?

  • 1
    Your code works for me (after replacing the relevant values) and looks correct (though I have to write `jira=JIRA(options=options, basic_auth=...)` to avoid a warning). Does the user specified in the `basic_auth​` currently exist on your JIRA server? I suspect that it does not. – jwodder Dec 19 '14 at 18:44
  • 1
    Thanks for answer! I've found the issue - it was in custom field that was required for all issues and its name was actually Account. After passing values for this custom field everything was ok – doweevenexist Dec 25 '14 at 12:18

0 Answers0