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

Error trying to configure group privileges for a project

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.12
    • Fix Version/s: 3.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Debian GNU/Linux 6.0.3 (squeeze) 64bits

      Description

      I just upgraded our Sonar server from 2.5 to 2.12, following the steps described in the upgrade guide (pretty handy, by the way). Everything looked pretty well to me until I tried to configure groups privileges on a project. The interface shows tipical error window and Sonar log looks like this:

      2011.12.19 15:22:22 ERROR o.s.s.ui.JRubyFacade  Fail to render: http://sonar/roles/edit_groups?redirect=projects&resource=98784&role=codeviewer
      undefined method `<=>' for nil:NilClass
              On line #26 of app/views/roles/edit_groups.html.erb
      
          23: <td style="padding: 5px 0pt;" valign="top">
          24: <h2>Ungranted groups</h2>
          25: <select name="from" id="from" size="20" style="margin: 5px 0pt; width: 300px;" multiple="multiple">
          26: <% ungranted_groups.sort.each do |group| %>
          27: <option value="<%= group ? group.id : '' -%>"><%= group_name(group) -%></option>
          28: <% end %>
          29: </select>
      
          org/jruby/RubyArray.java:3242:in `sort!'
          org/jruby/RubyArray.java:3221:in `sort'
          app/views/roles/edit_groups.html.erb:26
          org/jruby/RubyKernel.java:2056:in `send'
          org/jruby/RubyKernel.java:2064:in `send'
          org/jruby/RubyProc.java:268:in `call'
          org/jruby/RubyProc.java:228:in `call'
          file:lib/jruby-rack-1.0.0.1.jar!/vendor/rack-1.2.1/rack/head.rb:9:in `call'
          file:lib/jruby-rack-1.0.0.1.jar!/vendor/rack-1.2.1/rack/methodoverride.rb:24:in `call'
          file:lib/jruby-rack-1.0.0.1.jar!/rack/adapter/rails.rb:36:in `serve_rails'
          file:lib/jruby-rack-1.0.0.1.jar!/rack/adapter/rails.rb:41:in `call'
          file:lib/jruby-rack-1.0.0.1.jar!/jruby/rack/rails.rb:185:in `call'
          file:lib/jruby-rack-1.0.0.1.jar!/rack/handler/servlet.rb:19:in `call'
      

      The diff against prior version pointed to 'ungranted_groups.sort.each' (on 2.5, it was 'ungranted_groups.each'). Can't provide a patch for this since I know little of JRuby (or whatever this is).

      As a workaround for me, I switched back to 'ungranted_groups.each' and worked again like a charm.

        Attachments

          Activity

            People

            Assignee:
            simon.brandhof Simon Brandhof (Inactive)
            Reporter:
            eduardo.ortiz Eduardo Ortiz
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: