marc0l92 / obsidian-jira-issue

This plugin allows you to track the progress of Atlassian Jira issues from your Obsidian notes.
https://marc0l92.github.io/obsidian-jira-issue/
GNU Affero General Public License v3.0
234 stars 36 forks source link

Add Support For Multiple Jira Instances #15

Closed wstewarttennes closed 1 year ago

wstewarttennes commented 2 years ago

Would love to be able to pull multiple jira instances here!

marc0l92 commented 2 years ago

I never thought about this use case. Are the projects in those 2 instances connected somehow? in the same Jira Search would you like to get data from both instances? how do you imagine this feature from the user point of view?

I can add in the plugin settings a way to add more credentials, but I'm not sure about the structure I should use in the notes. Do you have any suggestion?

dooderino commented 2 years ago

Additional credentials would be great. I would need one bearer token for my desktop and another for a mobile device (I think.)

marc0l92 commented 2 years ago

Do you want to connect to the same Jira Server using multiple credentials? Or you want to connect to multiple Jira Server with unrelated user stories?

dooderino commented 2 years ago

The same Jira Server using multiple credentials. I'm not sure if it is the solution to my issue or not. What I'm seeing is that on one machine the credentials function properly, but on another computer or mobile I see: Syntax Error: JSON Parse error: Unrecognized token '<'

marc0l92 commented 2 years ago

in the last version of the plugin I added a new option in the settings to display additional debug information. Could you update the plugin to the last version, enable the debug mode in the plugin settings, open the console with Ctrl+Shift+i and check what is the response you get from Jira?

The error Unrecognized token '<' is generated when the response of the api is an HTML page instead of a JSON.

Please read the full response body and let me know if you are able to get more information.

apricot13 commented 2 years ago

just chiming in on this thread as it's something I could really use!

I work as a consultant and we have our own internal JIRA instances as well as client JIRA's which change depending on projects so I need to be able to chop and change them fairly frequently!

something like this would be amazing! 🙌

instance = "client one"
project = blah AND assignee = currentUser()
wadevries commented 2 years ago

I also have a similar use case as @apricot13 describes, with our own JIRA instance and then several customer-specific JIRA instances.

For me it is mostly about inline references. I was thinking of being able to choose a prefix per configured JIRA instance. Or the api client could do a round on the instances to see which one has the referenced project (but that requires uniqueness of project keys across all instances, which is not guaranteed).

marc0l92 commented 2 years ago

Ok, I will work on it in the following weeks. I the past weeks I was in holidays.

I could implement both solution: with the inline tag JIRA:AAA-123 the plugin will search in all accounts. With the tag JIRA1:AAA-123 it will search in the first account only.

marc0l92 commented 1 year ago

Hello. In the new release 1.29.0 of this plugin you can find the first implementation of a multi account support. Please let me know your feedback and suggestions.

@wadevries @apricot13 @dooderino @wstewarttennes

wadevries commented 1 year ago

@marc0l92 very nice, thank you for this update! A few thing I noticed;

  1. My original configuration did not seem to have migrated to the 'Default' account when updating the plugin (it displayed 'https://your.company.com/jira') (I updated the plugin by clicking 'Check for updates', then clicking 'Update all').
  2. The 'Default' account's host field has a placeholder value of https://your.company.com/jira, but adding /jira to my actual Atlassian host makes authenticating fail. Authentication (using Jira Cloud) only worked when I omit /jira from Host, e.g. https://mycompany.atlassian.net.
  3. I cannot compare it anymore, but it seems as if the inline tags are not properly aligned vertically (they're too high in the line).
marc0l92 commented 1 year ago

Issue 2 and 3 fixed in version 1.33.0.