I'm automating some ticket creations in Jira. It's working fine for the most part, but its not being assigned to the correct user. All the tickets created get created with "unassigned" as the assignee. Everything else works as expected.
Here's what I'm using:
# Jira API Configuration ###
JIRA_SERVER = "https://mycompanyname.atlassian.net"
JIRA_USER_EMAIL = "[email protected]"
JIRA_API_TOKEN = "PROPER_API_TOKEN_XY9ACiVnKDKog8hTa_l5k=856316AB_PROPER_API_TOKEN"
JIRA_PROJECT_KEY = "CorrectProjectKey"
JIRA_ASSIGNEE_EMAIL = "[email protected]"
# ### Ticket Details ###
OUTPUT_FIX_VERSION = "1.0.8"
OUTPUT_ISSUE_TYPE = "Task"
issue_dict = {
'project': {'key': JIRA_PROJECT_KEY},
'summary': ticket_title,
'description': ticket_description,
'issuetype': {'name': OUTPUT_ISSUE_TYPE},
'assignee': {'emailAddress': JIRA_ASSIGNEE_EMAIL},
'fixVersions': [{'name': OUTPUT_FIX_VERSION}]
}
What is the issue? Am I using wrong key words in the API configuration? I have checked the project setting in Jira and my user is assigned as a lead. When I create a ticket manually, By default it says "Automatic", but my user is in the drop down of the assignee list and I can select it.