Skip to content

Add Jira Connect branches controller

Tom Quirk requested to merge 2647-backend into master

What does this MR do?

This MR is part 3/3 for #2647 (closed). For a full-context MR (all of these MRs combined), see !64890 (closed).

In this MR, we add the backend, namely:

  • a new controller, branches_controller.rb
  • The Haml template for the jira_connect/branches/new route
  • Add the JS file to initialize the Vue app
  • A feature flag and specs.

UX will be reviewed in the full-context MR: !64890 (closed). Any required changes as a result of the UX review will be made in follow-up MRs.

- this MR is behind feature flag jira_connect_create_branch, disabled by default and scoped to user actor.

Manual Testing

  1. Setup a Jira Cloud instance.

  2. Open this branch in Gitpod.

  3. Install the app manually in Jira from the Gitpod URL (/-/jira_connect/app_descriptor).

  4. Open a Jira issue and check that the "Create branch" action doesn't show up.

  5. Enable the FF in Gitpod and reinstall the app.

  6. Open a Jira issue and see the "Create branch" action in the right sidebar:

    image

  7. Click it, create a branch, and once it's synced back to Jira reopen the issue and see the branch(es):

    image

  8. Click the dropdown menu to create another branch:

    image

To do

  • [-] Need to provide the Jira URL to the frontend, so that we can give the user the option to return to Jira.
  • Tests, probably a feature spec to test the whole flow, and some basic unit tests for the controller. The frontend parts look like they already have solid coverage! 👍
  • Some refactoring to reuse code from normal issues.
  • A feature flag check.
Iteration MR
1. frontend Add supporting Vue components !66034 (merged)
2. frontend Add the parent Vue app and initialization JS !66036 (merged)
3. backend Add the backend 🚀 This MR

Screenshots or Screencasts (strongly suggested)

Happy path:

jira-current

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #2647 (closed)

Edited by Tom Quirk

Merge request reports