20

We are using Jira 6.4.1 connected to Bit bucket 4.3.2. When i look at the releases for my project i see a number of warnings for some specific Jiras. The warning is:

Unreviewed Code These issues have been marked complete but the commits are not part of a pull request or review.

Usually as my workflow i may push commits direct to the repo without code review; but the issues listed seem a bit random and i can workout whats been done with them.

What causes this state and warning, and how can i resolve it?

1
  • Very random warnings indeed. I couldn't figure out either why out of hundreds commits, only two were marked by this warning.
    – Boaz
    Commented Nov 8, 2016 at 13:13

2 Answers 2

16

This warning is caused by having a jira issue key used in commits, but that issue key not appearing in a pull request or review. The assumption is made that all code included in that release should be reviewed.

There are two ways to remove that warning. The first is to change your development process and start using pull requests instead of committing straight to master.

The second is to turn that warning off. On the warnings tab there should be a button Manage Warnings that opens a dialogue where you can select what will trigger a warning. You want to unselect the Unreviewed Code checkbox.

Update: To quote Ruslan's comment below because it's easy to miss: "In current Jira version there is no Warnings tab and Manage Warnings menu item is placed under ... button that is right from Issues title above issues list on a release details page. It was really hard to find, so I just leave it here for other people."

3
  • 7
    Hi, is there any definition on what a code review is? Is it only exclusive to Crucible, or can it be triggered via an API or somewhere on bitbucket?
    – Sean
    Commented Mar 29, 2017 at 10:28
  • 2
    I believe JIRA considers the code to be reviewed when a commit is part of a merged pull request.
    – voneiden
    Commented Dec 12, 2018 at 9:25
  • 4
    For reference: In current Jira version there is no Warnings tab and Manage Warnings menu item is placed under ... button that is right from Issues title above issues list on a release details page. It was really hard to find, so I just leave it here for other people. Commented Apr 7, 2023 at 19:26
10

This issue can happen regardless of using pull requests, for example if someone refers to the issue only in a merge commit message.

To resolve this and get rid of the warning, you can create an empty commit (git commit --allow-empty -m "Review ISSUE-13") in a new branch that references all the issues affected using the commit message. Then open a pull request for it and merge it as usual. Jira will see the pull request as being merged and the warning is cleared.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.