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

Bulk change of issues should not generate useless logs on external issues

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4
    • Component/s: Issues, Web API
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      What is happening

      When doing a bulk change of issues (in the UI or with WS) containing external issues, a useless error log is generated, even if everything is correctly working.
      Here's the error log :

      An error occur when trying to apply the action : do_transition on issue : AWYgxeN-vOWp7Yd6FsYb. This issue has been ignored. Error is 'No transition allowed on issue from externally define rule'
      java.lang.IllegalArgumentException: No transition allowed on issue from externally define rule
      	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
      	at org.sonar.server.issue.TransitionAction.canExecuteTransition(TransitionAction.java:67)
      	at org.sonar.server.issue.TransitionAction.execute(TransitionAction.java:57)
      	at org.sonar.server.issue.ws.BulkChangeAction.lambda$applyAction$2(BulkChangeAction.java:242)
      	at java.lang.Iterable.forEach(Iterable.java:75)
      	at org.sonar.server.issue.ws.BulkChangeAction.lambda$bulkChange$1(BulkChangeAction.java:232)
      

      How to reproduce

      1. Go to the Issues page
      2. Find some external issues
      3. Select some none-external and some external issues
      4. Choose any transition
      5. Click on Apply button
        -> None-external issues will be updated, external issues will be ignored (as expected)
        -> A error log will be generated (not expected)

      How to fix

      in api/issues/bulk_change, no check should be done on external issues, but org.sonar.server.issue.TransitionService#doTransition() should do nothing on external issue.

        Attachments

          Activity

            People

            Assignee:
            julien.lancelot Julien Lancelot
            Reporter:
            julien.lancelot Julien Lancelot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: