Closed kpolivier closed 5 years ago
Hi @kpolivier, try to create a token form your Jira Web Application and use this token in the plugin password field. 👍
yes, that's what I did. Otherwise I had been unable to connect...
Sorry, I did not catch the info. 👍 Follow these steps please:
Did you see any json data?
Yes, on Chrome I can connect to Atlassian and get the JSon with the URL you gave me. But when trying to select a project in VSCode I got the message 'Set working project' in the upper bar and no project to select...
The fastest way to hack the code and understand what's append is open this file: on macOS / Linux ~/.vscode/extensions/gioboa.jira-plugin-0.18.2/out/src/services/store.service,js on Windows: %USERPROFILE%.vscode\gioboa.jira-plugin-0.18.2\out\src\services\store.service,js and at line 46 insert this code:
console.log('JIRA projects', yield this.state.jira.getProjects());
Save the file and restart VsCode Now if you open VsCode Developer Tools you can see the console.log with all projects retrieved by the HXR call.
Here is what I got:
[Extension Host] JIRA projects Array(0) length: 0 __proto__: Array(0)
If I try to connect with this command, I got an empty array, so I suppose the problem is from Atlassian, not the plugin: curl -v https://{mysite}.atlassian.net/rest/api/2/project --user {myusertoken}={myuserPassword}
I will check if everything is ok on my account...
I tried to delete my token and generate it again but no more luck...
In the documentation, I found /rest/api/2/project was deprecated and now we should use instead /rest/api/3/project/search but even with this URL, I got an empty array... Ar you able to get something on your side?
Yes, I can modify the code for use the new endpoint.
If you try with curl this one /rest/api/3/project/search?jql=&maxResults=200
you get some results?
ok, that's all fine now... I get the project... thank you!
Did I miss something? 😕 Is it working?
yes, it's working now. Be sure to use the new URL /rest/api/3/project
So I will modify the pulgin to call /rest/api/2/project and if there aren't projects /rest/api/3/project. ok?
As it seems rest/api/2 is being deprecated, I would have done the opposite but anyway, it should work...
But I don't know why rest/api/2 call give me an empty array whereas rest/api/3 send me the full list... I suppose some bug in the atlassian API...
@MrRefactoring do you think we can include the version option in jira-connector getAllProject call?
@MrRefactoring do you think we can include the version option in jira-connector getAllProject call?
I think it can be done. Could you get an issue so that I don't forget to do this in my free time?
I reopened this issue https://github.com/floralvikings/jira-connector/issues/177 @kpolivier I will prepare a new version of jira-plugin.
@kpolivier I cannot reproduce the problem in my Jira. Could you try this version for me please? In this new version first we call v3 API for projects and v2 is the fallback call. --- file removed --- Let me know, thanks. 👍
for me it's good. I even try to replace line 72 of http.service.js with "apiVersion: '2'" to test with v2 and I got no projects as it was for yesterday so I think everything is alright...(except the bug from atlassian with api v2 for me...) Thank you for your job.
Describe the issue Can't connect to atlassian anymore... They seem to have change securities for authentification in june: https://confluence.atlassian.com/cloud/deprecation-of-basic-authentication-with-passwords-for-jira-and-confluence-apis-972355348.html I have been able to set up the plugin to connect but no way to select a working project in the status bar, it's empty and no error in the log...
To Reproduce Try to set the plugin with an atlassian account with basic authentication, & 301 (authorization failed) will occured. When creating a JsonWebToken in the atlassian account and set up the plugin again, connection seems to be ok but no working project available... Jira-plugin version is 0.18.2