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

Some rules might not have some "rules.created_at" date and in that case quality profile page can't be displayed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2
    • Component/s: Quality Profile
    • Labels:
      None

      Description

      The following exception is thrown when trying to display such rules :

      2014.03.17 17:05:49 ERROR [o.s.s.ui.JRubyFacade]  Fail to render: http://localhost:9000/rules_configuration/index/158?sort_by=SORT_BY_CREATION_DATE&searchtext=MS_CANNOT_BE_FINAL&rule_activation=INACTIVE&inheritance=any&commit=Search
      undefined method `to_date' for nil:NilClass
      	On line #114 of app/views/rules_configuration/_rule.html.erb
      
          111: <% if rule.status == "REMOVED" %>
          112: <span id="rule_available_since_<%= rule.id -%>"><%= message('rules_configuration.removed_since') %>: <%= human_short_date(Api::Utils.java_to_ruby_datetime(rule.updatedAt)) %></span>
          113: <% else %>
          114: <span id="rule_available_since_<%= rule.id -%>"><%= message('rules_configuration.available_since') %> <%= human_short_date(Api::Utils.java_to_ruby_datetime(rule.createdAt)) %></span>
          115: <% end %>
          116: </div>
          117: </div>
      
          app/helpers/application_helper.rb:113:in `human_short_date'
          app/views/rules_configuration/_rule.html.erb:114
          org/jruby/RubyKernel.java:2227:in `send'
      

        Attachments

          Activity

            People

            Assignee:
            julien.lancelot Julien Lancelot
            Reporter:
            freddy.mallet Freddy Mallet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: