Improve behavior when opening PR Jira issue URLs in new tab

XMLWordPrintable

    • 11
    • 1

      When a Jira issue URL is generated on a pull request, it is generated with a hyperlink to the following location:

      • plugins/servlet/jira-integration/issues/TEST-123

      Since this URL doesn't use the same logic that the default JavaScript uses when the URL is clicked normally on the PR page - in the event that there are multiple app-linked Jira instances, the default behavior of the Jira integration plugin is to "brute-force" finding the issue by iterating through them one at a time until it finds its first match or it can't log in to the next Jira instance in the list.

      Ideally this behavior would be enhanced by either:

      • Having Bitbucket instead generate a URL that links to the correct Jira instance for the first URL that is created on page load.
        • This likely can't be done for performance reasons, as this more intensive logic/look-up would need to be done (possibly many, many times) on every page load instead of only when the URL is clicked.

      OR

      • Enhance the default jira-integration-plugin behavior by, instead of exiting as soon as it finds a Jira instance that it can't log in to, have the plugin continue to go through the Jira instances looking for a match until it completes the list and still doesn't have a match.
        • In this solution, we can still run into the behavior where if there's more than one matching project/issue number combination in all of the app-linked Jira instances, the integration plugin will just send you to the very first match - which possibly won't match what is correct based on Bitbucket's configured "primary" application link and any project links associated with the PR's project, etc.

              Assignee:
              Unassigned
              Reporter:
              Evan Slaughter (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: