obsidian-jira-issue icon indicating copy to clipboard operation
obsidian-jira-issue copied to clipboard

Add Support For Multiple Jira Instances

Open wstewarttennes opened this issue 3 years ago • 10 comments

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

wstewarttennes avatar Jul 03 '22 03:07 wstewarttennes

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?

marc0l92 avatar Jul 05 '22 08:07 marc0l92

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

dooderino avatar Jul 18 '22 18:07 dooderino

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?

marc0l92 avatar Jul 18 '22 18:07 marc0l92

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 '<'

dooderino avatar Jul 18 '22 18:07 dooderino

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.

marc0l92 avatar Jul 18 '22 18:07 marc0l92

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()

apricot13 avatar Aug 16 '22 14:08 apricot13

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).

wadevries avatar Sep 01 '22 11:09 wadevries

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 avatar Sep 01 '22 16:09 marc0l92

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

marc0l92 avatar Sep 23 '22 21:09 marc0l92

@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).

wadevries avatar Sep 26 '22 08:09 wadevries

Issue 2 and 3 fixed in version 1.33.0.

marc0l92 avatar Nov 10 '22 22:11 marc0l92