Steps to reproduce:

      1. install JIRA 6.1 and Stash 2.8.1
      2. set the Base URL to using direct URL (eg: http://localhost:8080/jira and http://localhost:7990/stash) instead of the FQDN
      3. create the Application Link using the direct URL
      4. edit the Base URL to use the FQDN (eg: http://example.com/jira and http://example.com/stash)
      5. In the Application Link, edit the Display URL to use the FQDN
      6. create sample issue in JIRA and try the "Create Branch" link. It will re-direct the user to http://localhost:7990/stash instead of http://example.com/stash
        the expected result is to get the user to be re-directed to the http://example.com/stash when user click on the "Click Branch"

      On a side note, different behaviour is observed for JIRA 6.1 and FeCru 3.1.4:

      1. install JIRA 6.1 and FeCru 3.1.4
      2. create the Application Link to use direct URL instead of FQDN
      3. edit the Display URL to use the FQDN URL
      4. create issue and try to Create Review from the Source tab
      5. user will be re-direct to the FQDN URL of FishEye

            [JSWSERVER-14920] Create Branch for Stash using the incorrect URL

            metapoint added a comment -

            See linked ANL-3 issue. This is an issue with the version of navigation links bundled with stash.

            metapoint added a comment - See linked ANL-3 issue. This is an issue with the version of navigation links bundled with stash.

            Luc Calaresu added a comment - - edited

            it@apexcapitalcorp.com did notice something really interesting.

            Here is my configuration:

            As rsmart says:

            The URL that create branch uses is given to it by stash (its baseURL in the json response at: stashinstance/rest/capabilities/navigation) NOT application links (it is the base URL as set in stash).

            When my JIRA instance hit http://localhost:7990/rest/capabilities/navigation, the JSON answer is:

            {
                "create-branch":[{
                        "href": "http://localhost:7990/plugins/servlet/create-branch",
                        "label": "Stash",
                        "icon": "http://localhost:7990/plugins/servlet/create-branch/icon.png",
                        "tooltip": "",
                        "lang": "en-GB",
                        "weight":300
                    }]
            }
            

            In conclusion, the JIRA behaviour is not wrong. Only the JSON answer from the Stash instance should be as configured in my Stash instance Base URL:

            "href": "https://full.stash.address.com/plugins/servlet/create-branch"

            It is not a JIRA issue, but a STASH issue. I have not found any related bug ticket yet within the Atlassian Stash Project... I opened the issue STASH-4250.

            Luc Calaresu added a comment - - edited it@apexcapitalcorp.com did notice something really interesting. Here is my configuration: In the Stash instance: Stash Base URL: https://full.stash.address.com/ In the JIRA instance, configured Stash Application Link: Application URL: http://localhost:7990 Display URL: https://full.stash.address.com/ As rsmart says: The URL that create branch uses is given to it by stash (its baseURL in the json response at: stashinstance/rest/capabilities/navigation) NOT application links (it is the base URL as set in stash). When my JIRA instance hit http://localhost:7990/rest/capabilities/navigation , the JSON answer is: { "create-branch" :[{ "href" : "http: //localhost:7990/plugins/servlet/create-branch" , "label" : "Stash" , "icon" : "http: //localhost:7990/plugins/servlet/create-branch/icon.png" , "tooltip" : "", "lang" : "en-GB" , "weight" :300 }] } In conclusion, the JIRA behaviour is not wrong. Only the JSON answer from the Stash instance should be as configured in my Stash instance Base URL: "href" : "https: //full.stash.address.com/plugins/servlet/create-branch" It is not a JIRA issue, but a STASH issue. I have not found any related bug ticket yet within the Atlassian Stash Project... I opened the issue STASH-4250 .

            Apex-Test added a comment -

            Stash incorrectly identifies itself at stashinstance/rest/capabilities/navigation

            If I hit https://stashinstance/rest/capabilities/navigation all urls in the response start with https as they should, which by the way is what the Base URL is configured as in stash.

            If I hit http://stashinstance:8081/rest/capabilities/navigation all the urls in the response start with http://stashinstance:8081

            Apex-Test added a comment - Stash incorrectly identifies itself at stashinstance/rest/capabilities/navigation If I hit https://stashinstance/rest/capabilities/navigation all urls in the response start with https as they should, which by the way is what the Base URL is configured as in stash. If I hit http://stashinstance:8081/rest/capabilities/navigation all the urls in the response start with http://stashinstance:8081

            metapoint added a comment -

            Hi mabewley, So your base URL in stash is not set correctly to be what your users use to access stash? The base url has nothing to do with the urls used by applinks to communicate between the two applications.

            cc: luc1

            metapoint added a comment - Hi mabewley , So your base URL in stash is not set correctly to be what your users use to access stash? The base url has nothing to do with the urls used by applinks to communicate between the two applications. cc: luc1

            I have exactly the same problem...
            I am actually running a version 5 of Jira, and the main reason I wanted to upgrade to 6 was the ability to create a branch from jira... but it is not usable!!

            For me as well, users access to Jira/Stash through HTTPS, and both applications communicate together though other ports (non-ssl).......
            It makes this nice feature useless....

            Luc Calaresu added a comment - I have exactly the same problem... I am actually running a version 5 of Jira, and the main reason I wanted to upgrade to 6 was the ability to create a branch from jira... but it is not usable!! For me as well, users access to Jira/Stash through HTTPS, and both applications communicate together though other ports (non-ssl)....... It makes this nice feature useless....

            So this "works as designed"; but the result is we cannot use the feature.

            For my implementation both Stash and Jira are on the same server. Users access Stash and Jira through an IIS https proxy.

            Stash and Jira communicate between each other on a separate (non-https) localhost connector. As a result of this the stashinstance/rest/capabilities/navigation info returned knows nothing of the proxy (which is expected).

            The user is then given the wrong url from Jira to create the branch in Stash. I would expect the Stash application link from Jira to rewrite the URL when providing this information to the user using the "Display URL".

            Mark Bewley added a comment - So this "works as designed"; but the result is we cannot use the feature. For my implementation both Stash and Jira are on the same server. Users access Stash and Jira through an IIS https proxy. Stash and Jira communicate between each other on a separate (non-https) localhost connector. As a result of this the stashinstance/rest/capabilities/navigation info returned knows nothing of the proxy (which is expected). The user is then given the wrong url from Jira to create the branch in Stash. I would expect the Stash application link from Jira to rewrite the URL when providing this information to the user using the "Display URL".

            metapoint added a comment - - edited

            Works as designed.

            It uses the base URL for the Stash instance that is configured in Stash.

            Here's how it works:

            The URL that create branch uses is given to it by stash (its baseURL in the json response at: stashinstance/rest/capabilities/navigation) NOT application links (it is the base URL as set in stash).

            It doesn't use the direct URL entered in Application Links (or obviously its display url).

            metapoint added a comment - - edited Works as designed. It uses the base URL for the Stash instance that is configured in Stash. Here's how it works: The URL that create branch uses is given to it by stash (its baseURL in the json response at: stashinstance /rest/capabilities/navigation) NOT application links (it is the base URL as set in stash). It doesn't use the direct URL entered in Application Links (or obviously its display url).

            DSI-DxO added a comment -

            with this bug, ZenDesk plugin didn't work.
            I think the priority of this bug must be raised

            DSI-DxO added a comment - with this bug, ZenDesk plugin didn't work. I think the priority of this bug must be raised

            This bug means the we cannot make use of the "Create Branch" link from Jira as our Jira and Stash server is behind an SSL IIS proxy.

            It is a minor inconvenience - as there are other ways to create a branch in Stash - so will have to wait for this to be resolved.

            Mark Bewley added a comment - This bug means the we cannot make use of the "Create Branch" link from Jira as our Jira and Stash server is behind an SSL IIS proxy. It is a minor inconvenience - as there are other ways to create a branch in Stash - so will have to wait for this to be resolved.

              Unassigned Unassigned
              jalbion Janet Albion (Inactive)
              Affected customers:
              6 This affects my team
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: