Uploaded image for project: 'Crucible'
  1. Crucible
  2. CRUC-7198

REST API: Search for reviews which include a particular file does not return files in pre-commit patches

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      I am trying to use the REST resource /rest-service/reviews-v1/search/{repository}?path=<value>.

      Scenario 1 (that works correctly):

      1. Create a review
      2. Add content using "Browse Changesets" method
      3. Select a revision number (in my case, I've chosen #73)
      4. Click Done.
      5. Review CR-5 gets created
      6. Click on the file name on the navigation tree, and this gets displayed:
      7. Access http://localhost:8060/rest-service/reviews-v1/search/SVN?path=trunk/Testing.txt
      8. 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>
        
      9. This looks correct.

      Scenario 2 (that doesn't work):

      1. 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
        
      2. Create a review
      3. Add content using "Pre-Commit" method
      4. Upload the /Users/fkraemer/Desktop/svnprecommitpatch.txt file
      5. The uploaded patch will be automatically anchored to the SVN repository
      6. Click Finish Upload, then Done
      7. 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:

        1. the navigation tree of CR-5 shows SVN (trunk) above the file name,
        2. the navigation tree of CR-6 shows svnprecommitpatch.txt (which is the pre-commit file name) above the file name.
      8. Access http://localhost:8060/rest-service/reviews-v1/search/SVN?path=trunk/Testing.txt
      9. 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.

      Attachments

        1. Screen Shot 2015-03-20 at 4.41.23 PM.png
          68 kB
          Felipe Kraemer
        2. Screen Shot 2015-03-20 at 4.55.18 PM.png
          68 kB
          Felipe Kraemer

        Activity

          People

            Unassigned Unassigned
            fkraemer Felipe Kraemer
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: