So,
I am trying to download a file from JIRA ticket using jira-python, but I did find any userful information for that.
Has anybody done it so far ?
--Ishan
Community moderators have prevented the ability to post new answers.
Try something like this:
issue
=
jira.issue(
'JCD-6585'
)
attachment
=
issue.fields.attachment[
0
]
image
=
attachment.get()
with
open
(
'/tmp/Issue1_CA_JCD_6585.png'
,
'wb'
) as f:
f.write(image)
For me I found that you have to also ask for expanding attachment in order for this to work.
issue = jira.issue('JCD-6585', expand="attachment") ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do not you Pyton at all, just read documentation. Have you tried to use
attachment
(id)[source]
Get an attachment Resource from the server for the specified ID?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is documentation: https://pythonhosted.org/jira/#module-jira
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.