Manage Jira Connect subscriptions in Vuex
What does this MR do and why?
There is a feature flag in place (disabled by default) jira_connect_oauth
that implements an Oauth authentication flow for GitLab for Jira (a.k.a Jira Connect) users.
This MR is the initial part of #325278 (closed).
In this MR, we do the following:
- Initialize a Vuex store with the
subscriptions
data from the HTML dataset. - Remove injected
subscriptions
array in favor of using the Vuex state. -
⛳ Behind the feature flag, we fetch subscriptions whenapp.vue
mounts. (Note: this request currently isn't authenticated using the Oauth token, pending backend support: #357243 (closed)). - tests for all of the above
NOTE: the code behind the feature flag doesn't work end-to-end yet, pending backend support: #357243 (closed).
Related to #325278 (closed)
Screenshots or screen recordings
No user-facing changes. Current functionality is unaffected works as expected.
How to set up and validate locally
Because this affects the current app (with the feature flag disabled), we should smoke test current functionality to ensure there are no regressions. To do so, set up Jira and the GitLab for Jira app: https://docs.gitlab.com/ee/development/integrations/jira_connect.html#install-the-app-in-jira
Otherwise, follow the below steps to test the feature-flag-enabled state:
- Set up Jira and the GitLab for Jira app: https://docs.gitlab.com/ee/development/integrations/jira_connect.html#install-the-app-in-jira
- Follow this guide to test Oauth authentication: https://docs.gitlab.com/ee/development/integrations/jira_connect.html#test-the-gitlab-oauth-authentication-flow
- Verify via browser devtools that the
/subscriptions
request fires successfully.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.