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

Measure drilldown is failing on removed components

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1
    • Component/s: Measures
    • Labels:
      None

      Description

      When displaying the measure drilldown on a removed component, a 500 error is returned.

      Steps to reproduce :

      • Analyse a project
      • Delete a file or a folder
      • Display the measure drilldown using the id or the key of the removed component

      Here are the logs :

      2015.01.30 09:04:50 ERROR web[o.s.s.ui.JRubyFacade]  Fail to render: http://localhost:9050/drilldown/measures/6?metric=files
      undefined method `measure' for nil:NilClass
      	On line #44 of app/views/drilldown/measures.html.erb
      
          41:     <h3><%= @highlighted_metric.short_name -%></h3>
          42:
          43:     <p class="big">
          44:       <%= format_measure(@snapshot.measure(@highlighted_metric.key), :period => @period) %>
          45:     </p>
          46:   <% end %>
          47:   <% if @highlighted_metric!=@metric %>
      
          app/views/drilldown/measures.html.erb:44
      

        Attachments

          Activity

            People

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

              Dates

              Due:
              Created:
              Updated:
              Resolved: