gioboa / jira-plugin

Jira plugin for VsCode
https://marketplace.visualstudio.com/items?itemName=gioboa.jira-plugin
MIT License
265 stars 41 forks source link

issue: JIRA Base URL should be required to have protocol (http) #161

Closed bogdan-calapod closed 3 years ago

bogdan-calapod commented 3 years ago

Describe the issue After setting up the extension, when clicking an issue in the explorer it comes up with the following error:

image

To Reproduce Steps to reproduce the behavior:

  1. Configure VSCode with Remote WSL
  2. Log in to JIRA-Plugin and select active project
  3. Click on any issue in the explorer
  4. See error

Expected behavior A Jira Issue detail (or the VSCode Atlassian page if it is setup) page to be displayed

Screenshots See above

Desktop (please complete the following information):

Version: 1.54.3 (user setup) Commit: 2b9aebd5354a3629c3aba0a5f5df49f43d6689f8 Date: 2021-03-15T10:55:45.459Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042

WSL: Ubuntu 20.04

Log Log is empty - no entry is added but the error appears.

bogdan-calapod commented 3 years ago

Also when stopping a timer it doesn't send it to JIRA - I guess this issue could be renamed to Remote WSL Support in general ?

gioboa commented 3 years ago

Hi @bogdan-calapod, I never used the plugin under WSL so it's possible that some logics are different. All the functionality are broken or some of them are ok?

gioboa commented 3 years ago

Here the code used for open the selected Jira Issue. the vscode api that open the issue is vscode.commands.executeCommand('vscode.open', '');

bogdan-calapod commented 3 years ago

The lookup (e.g. select active issue from the command pallete) and the sidebar listings work great - it seems that anything related to files (?) such as opening an issue (I suspect you pull an HTML file locally and display that?) have problems - probably small changes required.

I've never worked on VSCode extensions before, but I can take a look to see what adjustments should be made to make it Remote WSL-friendly

bogdan-calapod commented 3 years ago

The weird thing is that the VSCode documentation for .open says that it should open any HTTP URL (which is exactly what you are doing on the file you pointed me to) - maybe this is an issue upstream ? (e.g. on the Remote WSL extension ? )

There is still the weird issue of updating the tracked time in JIRA though 😕 It's the main reason I wanted to use the extension, I can get around the issues not loading by using the web UI or the Atlassian plugin.

I suspect you're just doing a simple POST there, right ? Are there any other logs apart from the Output window where I can look ?

Thanks for the extension, by the way :D It's really nice!

bogdan-calapod commented 3 years ago

Ah, I just noticed something, the error message says:

remote://wsl+ubuntu-20.04/<MY_URL>.atlassian.net/etc

Shouldn't it be https:// instead of remote://wsl+ubuntu-20.04/ ? If so, I think it just needs the https:// added before ${configuration.get(CONFIG.BASE_URL)}.

Maybe something similar is happening with the POST requests as well ? (e.g. for time tracking and stuff)

gioboa commented 3 years ago

Yep maybe you understand the problem. CONFIG.BASE_URL is the first value in setup credential process Did you type "remote://....." ?

bogdan-calapod commented 3 years ago

Nope - but I did type myorg.atlassian.net without the protocol - that might be the problem. I'll check.

gioboa commented 3 years ago

mmm... anyway in the code I add the protocol in this piece of code for the jira-connector lib. but CONFIG.BASE_URL required it for 'vscode.open' command

bogdan-calapod commented 3 years ago

Yep, the issue was that I was dumb and didn't set the protocol correctly 🤦‍♂️ Issue opening works great now. I'm going to check the time tracking as well and get back to you :D If that works as well, then I think we can close this issue.

I think some input validation would work for dumb users like me ? 😅

Edit - Yep, everything works smashingly, so this doesn't have anything to do with WSL at all. Thanks a lot! :D I'll close this issue then.

gioboa commented 3 years ago

Yep 👍 add a validation can be a good things. If you like the project please give a star ⭐ Thanks 😄

bogdan-calapod commented 3 years ago

Starred! :D