How do I show all changesets or files which do not have reviews? How to show items Reviewed, In Review, and Unreviewed?

Brian Hargrove May 2, 2012

The following post answers this question one way...

http://confluence.atlassian.com/pages/viewpage.action?pageId=255361556

select revisions where (not in any review)

But this EyeQL reference guide answers it a different way...

http://confluence.atlassian.com/display/FISHEYE026/EyeQL+Reference+Guide

Look at the very bottom...

Show all the changesets with no review:

select revisions from dir / where not reviewed

group by changeset return csid, author, count(revisions), comment

So you might think that the "not in any review" and "not reviewed" might be the same but they are not as far as I can tell... According to the EyeQL reference guide...

reviewed is an alias for in or before any closed review.

So "not reviewed" would be equivalent to "not in or before any closed review".

So, which is the correct way to query for all files that do not have a review?

I'm writing a custom servlet to generate a report similar to the Review Coverage report in Crucible (under the Reports tab when looking at a particular source) that shows a pie chart of items that have been reviewed, in review, and unreviewed statuses.

Here is what I'm currently using to generate my pie chart:

1. Reviewed = " where (in any closed review) " - Used to get the list for items that have already been reviewed

2. In Review = " where (in any open review) " - Used to get the list of items that are currently being reviewed

3. Unreviewed = " where (not in any review) " - Used to get the list of items that have not been reviewed and are not in review

My assumption is that when an item is added to a review it is either it would either be in the open, closed, or draft status. Open and draft items are In Review and Closed items are Reviewed.

I don't know if these where clauses are correct but so far they seem to work.

Does anybody have any suggestions? Or a correct answers to this question?

1 answer

1 vote
Felipe Kraemer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 11, 2016

Hello @Brian Hargrove,

I created the following scenario in order to test the differences:

  1. Git repository containing two files, none of them being or having been reviewed (initially):
    1. Test.txt
    2. Test2.txt

    Running the query below against the Git repository Returns both files:

    select revisions where (not in any review)

    Running the query below against the Git repository Returns both files:

    select revisions from dir / where not reviewed
  2. Created a review and added Test.txt. Review state is Draft:
    Running the query below against the Git repository returns only Test2.txt

    select revisions where (not in any review)

    Running the query below against the Git repository Returns both files:

    select revisions from dir / where not reviewed
  3. Review state moved to Review:
    Running the query below against the Git repository returns only Test2.txt:

    select revisions where (not in any review)

    Running the query below against the Git repository Returns both files:

    select revisions from dir / where not reviewed
  4. Review state moved to Closed:
    Running the query below against the Git repository returns only Test2.txt:

    select revisions where (not in any review)

    Running the query below against the Git repository Returns only Test2.txt (as well):

    select revisions from dir / where not reviewed

So, the difference is:

  • not in any review: file never included in a review.
  • not reviewed: file can be included in a review, but the review is not closed. The file is considered "reviewed" once at least one of the reviews in which this file is included is closed.

I hope this clarifies!

Kind regards,
Felipe Kraemer

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events