Uploaded image for project: 'SR for Bitbucket - Development'
  1. SR for Bitbucket - Development
  2. SRBITB-684

Compare Jira issue keys case-insensitively

    Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: 5.6.15
    • Fix Version/s: 6.0.0
    • Labels:
      None
    • Sprint:
      DevTools 74, DevTools 75
    • Critical Points:
      0.7

      Description

      To reproduce:

      • Link Bitbucket to Jira.
      • Set up a 'Require valid Jira issues' hook with a regex that matches issue keys even when they have lower-case letters in them.
      • Create a commit in your local repo that contains a valid lower-case (or mixed-case) issue key.
      • Try to push that commit.

      Expected: The hook correctly determines that an issue with that key exists, and allows the push.

      Actual: The hook rejects the push.

      The problem is most likely that when the hook queries Jira in order to validate the keys it has found with the regex, the issue keys in the result are normalised to upper case. Therefore even if an issue key was found that matches the one found in the commit message, the hook wouldn't recognise them as matching because the casing would be different between them. Thus we should normalise the case before making that comparison. Note that this normalisation would take place after the keys had already been scraped from the commits, so if customers want to impose specific casing via the issue key regex then that will still work: we just have to account for the fact that Jira throws the case information away.

        Attachments

          Structure

            Activity

              People

              Assignee:
              jmarques Jose Marques
              Reporter:
              jchoules Joanna Choules
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Structure Helper Panel