Closed AGirin closed 7 years ago
Do you get a 'Remote server returned' error?
This is what I see.
Can you try again after pulling? I changed up the logging a bit.
Did that. Got Error 400 now.
One more time. You should get the actual body that JIRA is returning in the error msg.
Go this now:
And I see this error in the log:
except [NONE] Errno 4096: "Object of class stdClass could not be converted to string" at [/var/www/411/phplib/Target/Jira.php:78] 0:[sprintf() called at [/var/www/411/phplib/Target/Jira.php:78]] 1:[FOO\Jira_Target::createIssue() called at [/var/www/411/phplib/Target/Jira.php:52]] 2:[FOO\Jira_Target->process() called at [/var/www/411/phplib/REST/Alerts.php:214]] 3:[FOO\Alerts_REST->sendAlerts() called at [/var/www/411/phplib/REST/Alerts.php:83]] 4:[FOO\Alerts_REST->POST() called at [/var/www/411/phplib/REST.php:108]] 5:[FOO\REST->route() called at [/var/www/411/htdocs/api/alerts.php:6]], referer: http://test.test.com/alerts?query=state:(0+1)
Oh, looks like it's returning an object. Can you add a print_r
around line 76 in Target/Jira.php
?
I think I am doing something wrong. Does this look like what you wanted?
print_r;
if($curl->httpStatusCode < 200 || $curl->httpStatusCode >= 300) { throw new TargetException(sprintf('Remote server returned %d: %s: %s', $curl->httpStatusCode, $curl->httpErrorMessage, $ret)); }
print_r($ret);
, rather.
Yea, I tried that already and nothing new in the logs.
This is what I got with tcpdump:
Ok, I got it to work. First I must have assignee specified and second - actually specify the right assignee. I forgot that our Jira uses AD usernames and I was specifying the wrong one.
Not sure if this makes sense but maybe assignee must be require field?
I think it might depend on your JIRA project's config. We could probably load the full list of users via https://JIRA/rest/api/latest/user/search?username=%&maxResults=10000
. Not sure if it's worth the request.
That would be great I think. At least it would help us a lot.
https://github.com/etsy/411/issues/50 --> Just want to make sure you saw my last question. I could not find any references to https in templates. Jira ticket has a link to the issue but it is also https. I can fix this on my side but where exactly is this base_url?
I tried Jira functionality and I can see my projects and tasks but when I click send I just get an error - failed to send Alert. Not errors in the log files.