Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-14938

Using JIRA to create a branch in Stash doesn't select the correct repo.

    • 1
    • 4
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Using JIRA to create a branch in Stash doesn't select the correct repo.

      From the agile board, I selected an issue so that the detail appears in the pane on the right hand side, and then clicked "Create branch" under the development header.

      This takes me to a Stash page, with a number of fields pre-filled with sensible values.

      However, in the relevant Stash project, I have more than one git repository. The correct repository is not selected. Rather, the last used in Stash repository is selected.

      This would be greatly improved (and avoid creating branches in the wrong repo) if the correct repository was selected automatically.

      This affects JIRA 6.2.5 in conjunction with Stash 3.0.1.

          Form Name

            [JSWSERVER-14938] Using JIRA to create a branch in Stash doesn't select the correct repo.

            Niek Neuij added a comment -

            Thanks for fixing this! 👍

            Niek Neuij added a comment - Thanks for fixing this! 👍

            Hi everyone. I'm happy to announce that in Bitbucket Server 6.6 we added ability to link Jira and Bitbucket Server projects via Project links.

            In Jira:

            • When creating feature branch from Jira, the list of projects/repos will be prioritized according to Project links.

            Bitbucket Server:

            • When creating Jira issue from a comment, the list of Jira projects will be prioritized according to Project links.
            • When viewing issue details (if there are issues from different Jira instances with the same issueKey), the list of issues will be prioritized according to Project links.

            Please, don't forget to share feedback on the feature. We are keen to learn if there are any areas of improvement.

            To learn more about new features of Bitbucket Server 6.6 visit Release notes.

            Cheers,

            Anton Genkin
            Product Manager Bitbucket Server

            Anton Genkin (Inactive) added a comment - Hi everyone. I'm happy to announce that in Bitbucket Server 6.6 we added ability to link Jira and Bitbucket Server projects via  Project links . In Jira: When creating feature branch from Jira, the list of projects/repos will be prioritized according to Project links. Bitbucket Server: When creating Jira issue from a comment, the list of Jira projects will be prioritized according to Project links. When viewing issue details (if there are issues from different Jira instances with the same issueKey), the list of issues will be prioritized according to Project links. Please, don't forget to share feedback on the feature. We are keen to learn if there are any areas of improvement. To learn more about new features of Bitbucket Server 6.6 visit  Release notes . Cheers, Anton Genkin Product Manager Bitbucket Server

            The latest version of Create Branch Wizard does exactly what I need it to do! Many thanks to Michael at Mibex Software for being so responsive and implementing this! If highly recommend trying the plugin if you want to solve this problem.

            john coloccia added a comment - The latest version of Create Branch Wizard does exactly what I need it to do! Many thanks to Michael at Mibex Software for being so responsive and implementing this! If highly recommend trying the plugin if you want to solve this problem.

            My specific use case, and I assume this is very common, is that I have multiple Jira projects, which go with multiple Bitbucket Server projects. Within the Jira projects, I have multiple components which each map to a specific Bitbucket Server repo within the project.

            It would save us a TREMENDOUS amount of grief if I could simply get the "Create Branch" link to default to whatever repo I configure. I'd like to be able to set it up by Jira project (i.e. the whole project goes to one repo) and also optionally allow a specific component to link to a specific repo as well. 

            So perhaps I have the whole project linked to repo A, and within that project I have components 1,2,3. Maybe I want to link component 3 to repo B. So by default, when I click Create Branch, I'll get:

            Component 1 -> repo A

            Component 2 -> repo A

            Component 3 -> repo B

            This is one of my major headaches with Jira/Bitbucket Server, and simply implementing a scheme such as the above would really simplify our lives greatly. There's no plugin that currently does this. You can only go from a project to 1 repo with the available plugin, which really doesn't do us any good at all.

            Thanks for considering this.

            john coloccia added a comment - My specific use case, and I assume this is very common, is that I have multiple Jira projects, which go with multiple Bitbucket Server projects. Within the Jira projects, I have multiple components which each map to a specific Bitbucket Server repo within the project. It would save us a TREMENDOUS amount of grief if I could simply get the "Create Branch" link to default to whatever repo I configure. I'd like to be able to set it up by Jira project (i.e. the whole project goes to one repo) and also optionally allow a specific component to link to a specific repo as well.  So perhaps I have the whole project linked to repo A, and within that project I have components 1,2,3. Maybe I want to link component 3 to repo B. So by default, when I click Create Branch, I'll get: Component 1 -> repo A Component 2 -> repo A Component 3 -> repo B This is one of my major headaches with Jira/Bitbucket Server, and simply implementing a scheme such as the above would really simplify our lives greatly. There's no plugin that currently does this. You can only go from a project to 1 repo with the available plugin, which really doesn't do us any good at all. Thanks for considering this.

            DaveT added a comment -

            We've had the developer panel disabled because it always puts a "create branch" link on unresolved issues, regardless of whether the project is using git/stash or svn/fisheye (clicking the link always takes the user to Stash, which is confusing if your project is using subversion on an entirely different server).

            We've upgraded Jira and Stash a few times now, so I thought I'd enable the developer panel to see if the benefits to the git//stash users outweighs the confusion caused for other projects. I was disappointed to find the behavior described in this issue. In my testing, clicking the "create branch" on the developer panel in Jira takes you to stash, where it suggests you create the branch in the last stash repository you happened to visit. If you're working on the same project and in the same repository all the time, maybe it's not so bad. But for users who work on multiple things, it's an invitation to make a mistake.

            I don't know why Atlassian can't use the project-level application links (which establish a relationship between the Jira project and corresponding Stash project) to decide 1) whether or not it's appropriate to display the "create branch" link and 2) to at least suggest a repository in the appropriate Stash project (instead of just suggesting the last repository the user happened to look at).

            I agree with David's suggestion above regarding Stash repository selection: Stash should present a cascading select, with the appropriate Stash project selected and the second-level select list populated with the repositories in that project.

            I can't believe the developer panel has been around for as long as it has and it's still in this sad condition. Pretty disappointing.

            DaveT added a comment - We've had the developer panel disabled because it always puts a "create branch" link on unresolved issues, regardless of whether the project is using git/stash or svn/fisheye (clicking the link always takes the user to Stash, which is confusing if your project is using subversion on an entirely different server). We've upgraded Jira and Stash a few times now, so I thought I'd enable the developer panel to see if the benefits to the git//stash users outweighs the confusion caused for other projects. I was disappointed to find the behavior described in this issue. In my testing, clicking the "create branch" on the developer panel in Jira takes you to stash, where it suggests you create the branch in the last stash repository you happened to visit. If you're working on the same project and in the same repository all the time, maybe it's not so bad. But for users who work on multiple things, it's an invitation to make a mistake. I don't know why Atlassian can't use the project-level application links (which establish a relationship between the Jira project and corresponding Stash project) to decide 1) whether or not it's appropriate to display the "create branch" link and 2) to at least suggest a repository in the appropriate Stash project (instead of just suggesting the last repository the user happened to look at). I agree with David's suggestion above regarding Stash repository selection: Stash should present a cascading select, with the appropriate Stash project selected and the second-level select list populated with the repositories in that project. I can't believe the developer panel has been around for as long as it has and it's still in this sad condition. Pretty disappointing.

            Two observations here:

            • It would help if the the Stash dialog had an additional dropdown that allowed the user to select the Stash project and then the repo from the project rather than simply working from the list of all repos in the instance (quite possibly a large number).
            • It's too bad that the project-level application links between Jira and Stash apparently have no effect. Using them one could preselect the Stash project or projects relevant for a given Jira project. It's unfortunate that Atlassian provides a nice mechanism that simply isn't used between Jira and Stash...

            -David

            Intel CHD Jira Admin added a comment - Two observations here: It would help if the the Stash dialog had an additional dropdown that allowed the user to select the Stash project and then the repo from the project rather than simply working from the list of all repos in the instance (quite possibly a large number). It's too bad that the project-level application links between Jira and Stash apparently have no effect. Using them one could preselect the Stash project or projects relevant for a given Jira project. It's unfortunate that Atlassian provides a nice mechanism that simply isn't used between Jira and Stash... -David

            I as the project manager want to be able to define a connection between a specific JIRA project and one ore more repos in Stash. To be able to configure this connection either as fixed (developer must choose from the defined repos) or default (developer can overide the suggestion when branching) would be the icing on the cake.

            So this is really something that will make live easier for us who work with internal and external developers on many different projects, all running at the same time.

            nexum Support added a comment - I as the project manager want to be able to define a connection between a specific JIRA project and one ore more repos in Stash. To be able to configure this connection either as fixed (developer must choose from the defined repos) or default (developer can overide the suggestion when branching) would be the icing on the cake. So this is really something that will make live easier for us who work with internal and external developers on many different projects, all running at the same time.

            Thanks Michael, I'll do that.

            Atlassian-Admin added a comment - Thanks Michael, I'll do that.

            @Atlassian-Admin you should see messages in the Stash log about why the plug-in hasn't chosen to change the selected repository. The plug-ins log entries have the prefix "RIGHTREPO4STASH". If the problem persists, could you please create a JIRA issue in our bugtracker? https://mibexsoftware.atlassian.net/projects/REPOSELECT

            Mibex Software added a comment - @Atlassian-Admin you should see messages in the Stash log about why the plug-in hasn't chosen to change the selected repository. The plug-ins log entries have the prefix "RIGHTREPO4STASH". If the problem persists, could you please create a JIRA issue in our bugtracker? https://mibexsoftware.atlassian.net/projects/REPOSELECT

            @Michael just tried installing it, doesn't seem to work. It's installed fine, and we have jira issues at the same of commits, but it's still just always showing the last used repo. Any ideas?

            Atlassian-Admin added a comment - @Michael just tried installing it, doesn't seem to work. It's installed fine, and we have jira issues at the same of commits, but it's still just always showing the last used repo. Any ideas?

              Unassigned Unassigned
              81364dea4fa1 gkopff
              Votes:
              45 Vote for this issue
              Watchers:
              29 Start watching this issue

                Created:
                Updated: