Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add ability to switch between Jira accounts #98

Open
lisaross opened this issue Aug 3, 2018 · 1 comment
Open

Feature request: Add ability to switch between Jira accounts #98

lisaross opened this issue Aug 3, 2018 · 1 comment

Comments

@lisaross
Copy link

lisaross commented Aug 3, 2018

So first: this is an INCREDIBLE find. 💃 🕺 Thank you SO much for creating it. I can't even believe how helpful this has been already. So much so, that I want to use it for both of my Jira cloud instances, and just haven't been able to find a way to do so. Perhaps I'm missing something, perhaps it's not available to me.

If I'm missing - please point me correctly 🎉

If it's not possible, perhaps we could make it so? I know you are open to PRs, so I might have a look and try to teach myself some things, but I'm not there yet so I thought I'd start by putting the idea out to the more seasoned professionals 🖖 If it's an easy fix for you, I'd LOVE this feature.

Best case scenario would be to authenticate against more than one Jira domain at a time, but a nice runner up would be the option to switch between different domains (using the same Atlassian login)

Thanks again for this gem of a workflow. I'm damn near weeping right now. 😆

@steyep
Copy link
Owner

steyep commented Aug 7, 2018

@lisaross thanks, I'm glad you're finding this workflow useful!

I like your suggestion but I wonder how common that scenario is. If there is a high demand for it, I can certainly look into a way to incorporate it into the app.

In the meantime, if I'm correctly interpreting your comment to mean that both of your accounts use the same user/pass authentication, you could probably achieve similar results by creating a .alfred-jira folder for each of your accounts and symlinking them with a separate workflow.

For example:

  • Login to your primary account using the alfred-jira workflow.
  • Copy the settings directory cp -r ~/.alfred-jira ~/.alfred-jira-primary
  • Logout of your primary account using the alfred-jira workflow.
  • Login to your secondary account using the alfred-jira workflow.
  • Copy the settings directory cp -r ~/.alfred-jira ~/.alfred-jira-secondary
  • Delete the original settings directory rm -rf ~/.alfred-jira
  • Set up a second alfred workflow called jiradomainswitch (or something like that) that takes 1 argument (primary/secondary) which runs the script:
#! /bin/sh
alfred_settings=$HOME/.alfred-jira
account=primary
[[ "$1" == "secondary" ]] && account=secondary
test -L "$alfred_settings" && rm "$alfred_settings"
ln -s "$HOME/.alfred-jira-${account}" "$alfred_settings"

Then you still should be able to use alfred-jira but the settings/caches will reflect your symlinked account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants