Details
-
Suggestion
-
Resolution: Unresolved
Description
I am trying to use the REST resource /rest-service/reviews-v1/search/{repository}?path=<value>.
Scenario 1 (that works correctly):
- Create a review
- Add content using "Browse Changesets" method
- Select a revision number (in my case, I've chosen #73)
- Click Done.
- Review CR-5 gets created
- Click on the file name on the navigation tree, and this gets displayed:
- Access http://localhost:8060/rest-service/reviews-v1/search/SVN?path=trunk/Testing.txt
- XML response includes CR-5:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <reviews> <reviewData> ..... <permaId> <id>CR-5</id> </permaId> <permaIdHistory>CR-5</permaIdHistory> <projectKey>CR</projectKey> <state>Draft</state> <type>REVIEW</type> </reviewData> <reviewData> ..... <permaId> <id>CR-5</id> </permaId> <permaIdHistory>CR-5</permaIdHistory> <projectKey>CR</projectKey> <state>Draft</state> <type>REVIEW</type> </reviewData> </reviews>
- This looks correct.
Scenario 2 (that doesn't work):
- Create a pre-commit patch from the same repository and same revision #73:
svn diff -r 73:72 file:///Users/fkraemer/Repositories/SVN > /Users/fkraemer/Desktop/svnprecommitpatch.txt
- Create a review
- Add content using "Pre-Commit" method
- Upload the /Users/fkraemer/Desktop/svnprecommitpatch.txt file
- The uploaded patch will be automatically anchored to the SVN repository
- Click Finish Upload, then Done
- Click on the file name on the navigation tree, and this gets displayed:
Note:
Here, notice that the file path is exactly the same as the one in review CR-5.
However:- the navigation tree of CR-5 shows SVN (trunk) above the file name,
- the navigation tree of CR-6 shows svnprecommitpatch.txt (which is the pre-commit file name) above the file name.
- Access http://localhost:8060/rest-service/reviews-v1/search/SVN?path=trunk/Testing.txt
- The XML response will include CR-5 but will not include CR-6. The REST resource is not returning reviews which include files from pre-commit patches.
Thoughts and Suggestions:
I realize that the REST resource filters by a repository name, SVN in my case, and of course pre-commit patches have not been indexed by FishEye/Crucible.
However, if the review in which a pre-commit patch is being reviewed was able to anchor the pre-commit patch with the repository, this review could be included in the REST response.