Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hello @Mont
Welcome to the community.
Can you provide a link to the documentation you are using?
Based on this document
https://buildmedia.readthedocs.org/media/pdf/jira/latest/jira.pdf
...your syntax is incorrect (and you have a typo). The correct syntax would be (minimally)
jira_response = jira_client.create_issue('project'='replaceWithActualProjectId')
And note that you have to provide a valid Project ID value.
However, even that will not be enough as creation of an issue also requires specifying minimally the issue type and text for the Summary field of the issue.
Hello, I am using this one.
Similar to this in the documentation
issue_dict = { 'project': {'id': 123}, 'summary': 'New issue from jira-python', 'description': 'Look into this one', 'issuetype': {'name': 'Bug'},
Except I realized I do not have curly brackets in my project key. I just have the project id. I then tried putting it in curly braces {'id': <project_id>}
But I got the same error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want to use .create_issue(fields=... then I believe the syntax you'll need is
jira_response = jira_client.create_issue(fields={'project':{'id': <value>},})
Or you need to code like the example where you put the info into a dictionary (i.e. issue_dict) as shown and then provide that dictionary as the value assigned to fields
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think I found it. When I pass in the project id as a digit it works.
I was thinking the project id the project name.
So the project Id, project name, and project key are all separate variables?
When we're passing in the value to the project should it be a string or integer?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looking at the example you pasted in this thread from the documentation, you need to be passing in the project ID, which is an integer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.