Issue Summary

      It's not possible to display the commit information when the commit contains a file that was renamed.

      Steps to Reproduce

      1. Link Jira to Bitbucket Cloud.
      2. Create a repository in Bitbucket Cloud
        1. Add a file to it;
        2. commit the file, and;
        3. push it to the repository.
      3. Rename the file with git mv <oldfilename.txt> <newfilename.txt>
        1. commit the file with an issue key in the commit message;
        2. and push it to the repository.
      4. Access the issue mentioned in the commit message
      5. Click on the commit link in under the Development panel

      Expected Results

      The commit information would be displayed normally.

      Actual Results

      Jira fails to display the commit with the message Unable to retrieve commit information:

      And the exception below is thrown in the atlassian-jira.log log file:

      2019-08-13 17:18:37,441 devstatus.dvcs.bitbucket:thread-1 ERROR mfernandes 1037x259x3 14l6rq0 0:0:0:0:0:0:0:1 /rest/dev-status/1.0/issue/summary [c.a.j.p.devstatus.provider.LoggingDecorator] Call 'repository details for [SCRUM-3]' has thrown an exception
      java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: No enum constant com.atlassian.jira.plugins.dvcs.model.ChangesetFileAction.RENAMED
      	at com.atlassian.jira.plugin.devstatus.provider.source.dvcs.ChangesetDetailsFetcher.getChangesetsWithFileDetails(ChangesetDetailsFetcher.java:98)
      	at com.atlassian.jira.plugin.devstatus.provider.source.dvcs.DvcsCommitDetailHelper.getCommitInfoMappedByRepository(DvcsCommitDetailHelper.java:78)
      	at com.atlassian.jira.plugin.devstatus.provider.source.dvcs.DvcsDataProvider.lambda$getDetailDataFutureFor$0(DvcsDataProvider.java:160)
      	at com.atlassian.jira.plugin.devstatus.provider.LoggingDecorator.call(LoggingDecorator.java:56)
      	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
      	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
      	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: No enum constant com.atlassian.jira.plugins.dvcs.model.ChangesetFileAction.RENAMED
      	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:531)
      	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:492)
      	at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:83)
      	at com.atlassian.jira.plugin.devstatus.provider.source.dvcs.ChangesetDetailsFetcher.getChangesetsWithFileDetails(ChangesetDetailsFetcher.java:86)
      	... 9 more
      	at java.lang.Enum.valueOf(Enum.java:238)
      	at com.atlassian.jira.plugins.dvcs.model.ChangesetFileAction.valueOf(ChangesetFileAction.java:7)
      	at com.atlassian.jira.plugins.dvcs.spi.bitbucket.transformers.ChangesetFileTransformer.lambda$fromBitbucketDiffstat$0(ChangesetFileTransformer.java:22)
      ...
      

      Workaround

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

            [JSWSERVER-20187] Jira doesn't display commit information if file was renamed

            This bug affects most of the users of our Jira installation - usually one issue is developed with multiple commits to Bitbucket, and often one of those commits has some kind of move or rename operation. In such case we don't see any commits for the issue and it's hard for us to e.g. do code review.

            jaroslav-urban added a comment - This bug affects most of the users of our Jira installation - usually one issue is developed with multiple commits to Bitbucket, and often one of those commits has some kind of move or rename operation. In such case we don't see any commits for the issue and it's hard for us to e.g. do code review.

              Unassigned Unassigned
              mfernandes@atlassian.com Matheus Fernandes
              Affected customers:
              3 This affects my team
              Watchers:
              11 Start watching this issue

                Created:
                Updated: