Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-19587

Repository hook and repository merge check config form key is ignored

XMLWordPrintable

      Issue Summary

      The key for <config-form> subelement of repository-hook and repository-merge-check resolves to null-config-form instead of the actual key.

      This means that for apps with both a repository hook config form and a repository merge check config form, the 2nd config form will be used.

      Steps to Reproduce

      1. Create a repository hook module in `atlassian-plugin.xml` with a config form e.g.
      <repository-hook key="demoRepoHook" name="Demo Repository hook" class="plugin.DemoHook">
              <description>Demo Repo hook</description>
              <config-form name="Demo Hook Config" key="hook-config">
                  <view>plugin.hook.ref.hookConfig</view>
                  <directory location="/static/" />
              </config-form>
              <scopes>
                  <scope>project</scope>
                  <scope>repository</scope>
              </scopes>
          </repository-hook> 
      
          <repository-merge-check key="demoMergeCheck" name="Demo Merge check" class="plugin.DemoMergeCheck">
              <description>Demo Merge check</description>
              <config-form name="Demo Merge Hook Config" key="merge-check-config">
                  <view>plugin.hook.ref.hookConfig</view>
                  <directory location="/static/" />
              </config-form>
              <scopes>
                  <scope>project</scope>
                  <scope>repository</scope>
              </scopes>
          </repository-merge-check>

      Expected Results

      The correct config form is used for each of the repository hook and repository merge check.

      Actual Results

      Both repository hook and repository merge check use the same config form (the repository merge check one which is declared last)

      Workaround

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

              mgoyal2@atlassian.com Manish
              ysun Yingran Sun
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: