How to select all commits for a given user in EyeQL?

1k views Asked by At

In Crucible, I use advanced search.

I try to select all commits for a specified user that were not reviewed.

The following query:

select revisions 
from dir / 
where 
(on branch master 
or on branch release-10
)
and not reviewed
and date >= 2014-09-23
group by csid
return csid,author,comment,date

works fine, but if I try to add where clause for author it doesn't work.

The author looks like "First Last" (E.g. "John Smith").

I tried to use ( before and not reviewed ):

  • and author=First Last
  • and author='First Last'
  • and author="First Last"
  • and author in (First Last)
  • and author in ('First Last')
  • and author in ("First Last")

but there are some problems:

  • case 1:

    Search error:
    error parsing query: unexpected token: Last
    
  • case 4:

    Search error:
    error parsing query: expecting RPAREN, found 'Last'
    

or it doesn't return a result (case: 2, 3, 5, 6).

I am sure that "First Last" exists because it can be found using the query above.

How can I create the query?

2

There are 2 answers

0
ROMANIA_engineer On BEST ANSWER

I found a solution:

and author = "first last <[email protected]>"

Even if the author looks like "First Last" in the "Author" column, (s)he also has an e-mail that appears on mouse over.

0
ThomasH On

As you found out you have to search for the complete string of display name and email address. To construct this selection criterion the following trick is helpful:

  • Go to Standard Search. It displays a selection list of authors from the repo. The same author (email address) might appear multiple times if he has used variants in the display name ("First Last" vs. "Last, First" etc.). Select any author you are interested in (the list is multi-select) and hit "Search".
  • After the results have been displayed, switch to EyeQL Search. You will find a proper selection criterion for the selected author(s). You can now extend the query to suit your additional needs.