Skip to content

Improve calculation of the `first_mentioned_in_commit_at` issue metric

Summary

  • The first_mentioned_at_commit_at metric is set on an issue the first time a commit containing a reference to the issue is pushed
  • If a second commit is pushed which also has a reference to the issue, the metric is not updated (this is expected).
  • If the second commit has a committed_date earlier than the first commit, the metric is not updated (although it should).

Steps to reproduce

  • Create an issue
  • In branch A, create a commit with a reference to the issue in the commit message. Don't push it.
  • In branch B, create a commit with a reference to the issue in the commit message. Push it.
  • Push branch A.

Expected behavior

Since the commit from branch A happened before the commit from branch B, the issue's first_mentioned_in_commit_at metric should be set to the commit from branch A's committed_date.

Actual behavior

The issue's first_mentioned_in_commit_at metric is set to the commit from branch B's committed_date.

Possible fixes

/cc @pacoguzman @regisF @DouweM

Edited by Dan Jensen