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

Allow specifying a patch name when creating reviews via REST API or Crucible.py

XMLWordPrintable

    • 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.

      Problem Definition

      When creating a review via web interface and uploading a pre-commit patch, the patch file retains it's name in the review which is very helpful as it helps indicating what the patch file name relates to.

      However when using the command line or the REST API, the patch file name is generated automatically by Fisheye as something like: "CR-123-patch-1.txt"

      Suggested Solution

      The command line script and the REST API endpoint should have a new parameter that allows specifying a patch name.

      Workaround

      Currently the only workaround is to run database queries for changing the patch name. Follow these steps:

      1. Stop Crucible
      2. Create a database backup
      3. Run these SQL queries, adjusting the placeholders accordingly:
        update cru_fr_detail set cru_value = '<new_patch_name>.txt' where cru_value = '<old_patch_name>.txt';
        
        update cru_upload_item 
        set    cru_description = '<new_patch_name>.txt', 
               cru_original_name = '<new_patch_name>.txt' 
        where  cru_description = '<old_patch_name>.txt'' 
        or     cru_original_name = '<old_patch_name>.txt'';
        
      4. Start Crucible
      5. Refresh the review, and the new patch name should be displayed:

        1. image-2018-10-24-13-37-53-075.png
          333 kB
          Felipe Kraemer
        2. image-2018-10-24-13-50-09-404.png
          332 kB
          Felipe Kraemer

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

                Created:
                Updated: