univerze / laravel-jira

Easy access Jira rest api in Laravel5.
MIT License
15 stars 22 forks source link

Result always null #7

Closed hoanguel closed 8 years ago

hoanguel commented 8 years ago

Hi,

I have carefully follow instructions and ran into the same issue like this one here. The result is always null even though the username and password is correct.

URL were configured as: 'url' => 'https://my-company.atlassian.net/rest/api/latest/issue', and 'url' => 'https://my-company.atlassian.net', and 'url' => 'https://my-company.atlassian.net/rest/api', ,etc...

I also have tried accessing manually: https://my-company.atlassian.net/rest/api/latest/issue/AM-122 using same logged in account in config file and it work fine with JSON result.

Please advise, thank you!

univerze commented 8 years ago

Hi @hoanguel,

I have just tried the plugin and worked for me. The url in the config should be the baseurl: 'https://my-company.atlassian.net'. What is your jql you're trying to insert? Have you tested the jql in Jira? Best way to test is go to Jira -> Issues -> Search for issues. In the search toolbar click "Advanced" where you should see a single text input. Start typing and it will autocomplete. Start with something simple like "project = Yourproject" and press enter to search issues. Copy the jql into the Jira::search() method: $response = Jira::search( 'project = "My Project Name"' ); Let me know if it helped.

hoanguel commented 8 years ago

Hi,

Thank you for your response. I did exactly just that with the jql like: $response = Jira::search( 'project = "My Project" and status="In Progress"' ); and $response is always null. I can confirm url, username and password are all correct. JQL is working fine in JIRA's Advanced Search :(

univerze commented 8 years ago

Are you trying to connect to an Atlassian hosted Jira instance or it is your own installation? Can it be a setting that blocks the connection? Alternatively can you do a var_dump in vendor/univerze/laravel-jira/src/Jira.php in search method just before it gets json decoded to see what raw response comes from the server?

hoanguel commented 8 years ago

Thank you so much for your quick response. I was testing a local Laravel with Atlassian hosted Jira instance and got that issue. Today, I have tried installing on a remote server and confirm that it is working as expected. Might be the issue of connection blockage like you said. Again, thank you for this lovely package and being so helpful. Best wishes!