Using getDocument when defining custom field with javascript

Hi,

I tried to use the following code:

var my_url = “/rest/api/2/issue/PB-3128”;
var val = “”
getDocument(my_url, function(resp){
val = resp.status.name;
});

issue.PB_Status = val;

//---------------------------------------------------------------------------

I test it in the “Custom JavaScript code”
But I get an error message since it tries to access localhost in the URL instead of using the real Jira’s base URL.

Thanks,
Oded

Hi Oded,

The use of localhost is the expected behavior of this request, but in some occasions may not work because of the different configurations of Jira. You should contact support for more detailed checking of why the host does not work in your case. This problem with the getDocument may indicate that there are other problems also with the access of Jira REST APIs that may have effects on the data import.

Please, contact support support@eazybi.com
Kindly,
Janis