UX: Discuss implementation options for "Create GitLab branch from Jira issue"
Background
There are a few different ways to implement this feature for #2647 (closed).
Originally we planned to do this using Web Items, but I had some problems getting that working and went looking for other options.
There's also an ongoing transition to a new issue view in Jira, although this seems to be mostly complete now:
- https://support.atlassian.com/jira-core-cloud/docs/what-is-the-new-jira-issue-view/
- https://developer.atlassian.com/cloud/jira/platform/issue-view/
Development Tool module
This is what the prototype in !56769 (closed) currently uses. The implementation is very simple: We just define an URL in jiraDevelopmentTool.actions.createBranch.templateUrl, and can pass along the issue's key and title.
In Jira a link is then displayed in the issue sidebar:
Clicking the link opens a new tab in GitLab with the branch form. This is currently hacked together based on the branch form in projects, with an added project selector:
Once the branch is created it will be displayed in the same location as the link, and the link is moved into a dropdown menu:
👍 Benefits
- The link is very prominent.
- Simple implementation, we can reuse GitLab UI components.
- Although we could also use Jira UI styling.
👎 Problems
- Major: We don't receive a JWT from Jira, so we don't know which subscription the user/issue belongs to, and can't easily suggest the correct project based on the issue key.
- We can't display the form inside the Jira UI, the only option seems to be to open a new tab.
- Minor: We can't control the link itself (label, icon, dropdown behaviour).
Issue Content module
This adds a button below the issue title, and clicking it opens an inline Web Panel below with the branch form (which is just a quick mockup here):
The button label is only displayed in the fullscreen issue view:
👍 Benefits
- The button is very prominent, and we can control the icon and label.
- The form is displayed inline in the issue view.
- We receive a JWT and have access to the subscription info.
👎 Problems
- More implementation effort since we have to use Jira UI styling.
- Minor: We can't pass along the issue title, and would have to query it through the API.
Issue Action with the Web Item module
This adds a menu entry in the dropdown menu on the top right of the issue view:
Clicking it opens a dialog with the branch form:
👍 Benefits
- The form is displayed inside the Jira UI.
- We receive a JWT and have access to the subscription info.
👎 Problems
- More implementation effort since we have to use Jira UI styling.
- The link is hidden away in a menu.
- Minor: We can't pass along the issue title, and would have to query it through the API.
- Minor: Not sure if we can control the size of the dialog, the API does support pixels and size presets, but they don't seem to apply.
- Minor: Jira also displays a "Submit" button below the form which currently just closes the dialog, not sure if it's possible to connect this to our own form through their JS API.
Comparison
| Development Tool | Issue Content | Issue Action | |
|---|---|---|---|
| Link visibility |
|
|
|
| Form visibility |
|
|
|
| Subscription access | |||
| Implementation effort |
Common concerns
-
UX
- Once the branch is created, it takes a moment until it's synced back to Jira. The issue view also doesn't seem to auto-refresh, so the user has to reopen the issue to see the branch.
-
frontend
- When using Jira UI styling, I'm not sure how much work is needed to support the project/branch selectors.
-
backend
- Identifying the correct project could still be tricky (when more than one project uses the same key), or expensive (when we have large group hierarchies).
Questions
- Which approach makes the most sense for us?
- Which approach do other Jira integrations use?
- What do we need for an MVC?





