I have already created a forloop for create jira issues in bulk. However, I need to be able to attach relevant pdf files to those issues.
Here is an example of my current code for just 1 jira issue created with python.
jira_connection = JIRA(
basic_auth=('myemail@xxx.is', API),
server = "https://xxx.atlassian.net",
)
issue_dict = {
'project': {'key': 'AAA'},
'summary': 'Testing', #The name of the jira issue
'description': 'Testing',
'issuetype': {'name': 'Request'}
}
How do I add the pdf file as an attachment to this current jira issue?
Hi @Jóhanna Margrét Sigurðardóttir and welcome,
there is a specific REST API for that. https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-issue-issueidorkey-attachments-post
Hope this helps,
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you're welcome @Jóhanna Margrét Sigurðardóttir . Please mark my answer as accepted if it solved your question
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.