No rejection message is shown on the UI when a tag creation is vetoed by a hook n

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      Midori's Better Commit Policy for Bitbucket found a bug in how Bitbucket handles tag creation vetoes on the user interface. When a tag creation is vetoed by a hook, no rejection message is shown on the UI.

      The app implements a PreRepositoryHook hook which processes TagHookRequests to verify custom tag naming conventions.

      The bug is similar to https://jira.atlassian.com/browse/BSERV-10938 which is closed.

      This is reproducible on Data Center: (yes) / (no)

      Steps to Reproduce

      • Install “Better Commit Policy for Jira” app.
      • Create an app link between Jira and Bitbucket: [!https://www.midori-global.com/images/midori-logo-favicon.ico!User Manual - Better Commit Policy for Bitbucket | Midori|https://www.midori-global.com/products/better-commit-policy-for-bitbucket/data-center/documentation/#linking-bitbucket-server-to-jira]
      • Configure a tag rule/condition: [!https://www.midori-global.com/images/midori-logo-favicon.ico!User Manual - Better Commit Policy for Jira | Midori|https://www.midori-global.com/products/better-commit-policy-for-jira/data-center/documentation/#tag-conditions]
      • Configure the hook in Bitbucket: [!https://www.midori-global.com/images/midori-logo-favicon.ico!User Manual - Better Commit Policy for Bitbucket | Midori|https://www.midori-global.com/products/better-commit-policy-for-bitbucket/data-center/documentation/#configuring-hooks]
      1. Go to the Bitbucket project (for project level) or repository (for individual repositories) → Settings → Hooks.
      2. Enable the hook called Commit Policy Verification.
      3. Select the policy from the drop-down. (Please note that the selectable options are the commit policies defined in Jira.) You may eventually see a warning box above the drop-down if the app finds some problems:
        1. If the application link is not created yet: create the application link!
        2. If the application link exist, but is not configured properly: review the configuration of the application link at both ends!
        3. If Better Commit Policy for Jira is not installed to Jira: install that app!
        4. If there is no policy created yet: create a policy that you can use!
      4. Test:
        1. Try to create a commit which should be rejected.
          1. For example, if your policy requires at least one issue key, then make a commit with the message "No issue key here".
          2. Check if the commit is rejected.

      Expected Results

      • A message should display when the commit is vetoed.
      • Actual Results

      • No message is shown when the commit is vetoed.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            Assignee:
            Unassigned
            Reporter:
            Wagner M.
            Votes:
            9 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: