Hi,
I'm currently doing some migrations of issues from one Jira Cloud instance to our private Jira instance.
It's basically working well, but I got 2 issues I can't fix … Hopefully somebody here will be able to help me 
So, my script is in Ruby, and I'm using RestClient for GET/POST methods.
1) Unable to correctly set Assignee + Author of Comment
Here is my code to post_json (it's good as it works for plenty of stuffs for me):
def post_json(instance,location, json_data)
url,user,password = get_instance_infos(instance)
puts url + location
response = RestClient::Request.new(
:method => :post,
:url => url + location,
:user => user,
:password => password,
:headers => {
:accept => :json,
:content_type => :json
},
:payload => json_data
).execute
if !response.empty?
results = JSON.parse(response.to_str)
return results
end
end
When executing it, here is what I get:
{"fields":{"project":{"key":"EX"},"issuetype":{"id":"27"},"summary":"TEST - PRIVE consolidatie carriere","description":"TEST van de volgende issuesPENSA 4PENSA 6PENSA 5PENSA 7PENSA 8PENSA 13PENSA 14PENSA 136","assignee":{"name":"DEPOM"},"reporter":{"name":"HONNV"}}}
https://jira-dev01.onprvp.fgov.be/rest/api/2/issue
So basically, my json data is good + the URL is also good.
You've to know that I'm connected to RestClient with my own credentials (DEVAF) but here I'm trying to create an issue with assignee PATTA.
It ends with the issue created for DEVAF. Same for comments … even if the Rest call is correctly set.
The really weird stuff is that if I'm using «Advanced REST Client" plugin Chrome, doing exactly the same, it creates the issue correctly with Assignee PATTA.
I'm also connected with my DEVAF user … so it doesn't make any sense to me …
2) How to download attachments
I checked and tested plenty of examples on the Internet, I succeed to get the https://…/secure/<issue_id>/file.txt , but I'm just unable to download the file using REST API on my Ruby script.
It's unfortunate, as if I just put that URL on my browser, it works well …
Thanks for any help 
Regards;