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

[AXON-17] Fix weird site list behaviour #79

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sdzh-atlassian
Copy link
Member

@sdzh-atlassian sdzh-atlassian commented Jan 18, 2025

What is this

This PR addresses the weird behaviour that happens whenever we try to delete one site from several sharing a credential:

Before After
sites-before sites-after

After the change, it's possible to remove the sites individually. However, while working on this, I've found a couple other rather frustrating issues which will require a more comprehensive rework 😢

Specifically:

  • An error banner still seems to randomly appear at the top when deleting sites too fast due to a race condition
  • JQL configuration persists in the settings even after the credentials for the site have been removed. That might be intended, but in our case of lots and lots of JIRA sites this creates significant clutter 🤔

I've tried addressing these quickly - but since ultimately they are not a priority at the moment, I've left this PR at addressing the actual problem we got reported 😛

How was this tested?

Since this is mainly a UI change - by setting up the extension and clicking around a bunch? 😉

@sdzh-atlassian sdzh-atlassian force-pushed the AXON-17-site-list-fix branch 3 times, most recently from 07415bd to d2b7f08 Compare January 21, 2025 19:22
@sdzh-atlassian sdzh-atlassian changed the title [AXON-17] (WIP) fix weird site list behaviour AXON-17 (WIP) fix weird site list behaviour Jan 21, 2025
@sdzh-atlassian sdzh-atlassian changed the title AXON-17 (WIP) fix weird site list behaviour [AXON-17] (WIP) fix weird site list behaviour Jan 21, 2025
@sdzh-atlassian sdzh-atlassian changed the title [AXON-17] (WIP) fix weird site list behaviour [AXON-17] Fix weird site list behaviour Feb 6, 2025
@@ -120,6 +121,10 @@ export interface DetailedSiteInfo extends SiteInfo {
credentialId: string;
}

export function getSiteInfoKey(site: DetailedSiteInfo): string {
return `${site.product.key} - ${site.host} - ${site.credentialId}`;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bit here is more or less the key to everything - we can't index credential stuff with only credentialId since the credential is shared across all JIRA sites the user has access to when doing 3LO. So, let's use host in addition - and the keyword of jira/bitbucket for good measure ;)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea on the product key! 🎉

@bwieger-atlassian-com
Copy link
Collaborator

Looks like a bug got introduced.

Before: When I sign into one site, all my other sites are logged into and all the JQLs work
After: When I sign into one site, it says all my other sites are logged into, but only the one site JQL works.

Screenshot 2025-02-06 at 10 21 49 AM

Copy link
Collaborator

@bwieger-atlassian-com bwieger-atlassian-com left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New bug is introduced.

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

Successfully merging this pull request may close these issues.

2 participants