Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-14311

Make it explicit that /api/issues/bulk_change only sets comments on issues that are changed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.7
    • Component/s: Web API
    • Edition:
      Community
    • Production Notes:
      None

      Description

      Currently, /api/issues/bulk_change only sets a comment on issues that are either affected by a change of type, or a change of severity. It's not possible to set a comment, without changing the type or severity. This is not reflected in the documentation, and is misleading

      Problem

      Only passing a comment triggers an error

      The following looks valid, as per the Web API documentation, but it returns an error:

      POST /api/issues/bulk_change
      
      issues=issue-1,issue-2,issue-3&comment=Foo+Bar
      

      Error: "At least one action must be provided"

      Changing type/severity will only set a comment on issues of a different type/severity

      This is misleading. We would expect the comment to be set on both issues, but only issue-bug will get a comment:

      POST /api/issues/bulk_change
      
      issues=issue-bug,issue-code-smell&comment=Foo+Bar&set_type=CODE_SMELL
      

      Solution

      Quick win is to make the documentation more explicit. Note that there's a feature request to support only passing comment, making it a valid action.

        Attachments

          Activity

            People

            Assignee:
            duarte.meneses Duarte Meneses
            Reporter:
            wouter.admiraal Wouter Admiraal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: