gioboa / jira-plugin

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

feat: Multiple Jira Profiles/Instances #155

Closed danstreeter closed 3 years ago

danstreeter commented 3 years ago

Describe the solution you'd like Context: I currently work within an agency setup where we are working for multiple clients across multiple projects. Some of which already have their own Jira instances which we work within.

What is the potential to have the ability to 'switch' between configured Jira profiles/instances, and set up multiples that can be selected in a similar way to 'Setup Credentials' is used on initial setup, but instead of overriding it would be 'Setup Instance' and add to a collection/list/array of instances that a new option 'Switch Jira Instance' could then drive selection, thus then changing the rest of the extension feature-set to the new Jira instance.

With the addition of this functionality, you would also need to be able to manage the setup instances however a 'Delete Instance' option would probably be MVP which you could then run through 'Setup Instance' again to replace instead of a full edit journey.

danstreeter commented 3 years ago

My current limited understanding of what I'd expect to be 'secret management' within VSCode (and/or extensions) is limited, so I have no idea where the current 'Credentials' that are setup are stored, and how to view them, even if within code - however if you can point me to some documentation that covers this, I could potentially start looking at it, my thought pattern for this at present is as follows:

This is all presuming that the credentials that are being stored can be done so in JSON, or another structured form

gioboa commented 3 years ago

Hi @danstreeter , here you can find the vscode api to get the workspace storage. In this class there are all the methods for modify this storage. You can check and also debug the method setPassword or getCredentials. A migration form old credential logic must be implemented. Anyway an array of credentials can be a solution.

gioboa commented 3 years ago

here the vscode docs. At the end the famous getConfiguration method.

danstreeter commented 3 years ago

Hey @gioboa - Thanks for that, I'll take a look later.

Does the logic I've mentioned above look like a viable option, if so I'll start poking and see what I come up with.

gioboa commented 3 years ago

Yep, I don't know if official Jira Plugin for VsCode allow you to store different credentials. Have a look at it, maybe we can find some cool ideas.

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. Remove stale label or comment or this will be closed in 5 days. Thank you for your contributions.