3 options['resolved'] = 'false'
4 if @project.qualifier == 'TRK'
5 options['projectUuids'] = @project.uuid
7 options['componentRootUuids'] = @project.uuid
9 if @dashboard_configuration.selected_period?
10 options['createdAfter'] = Api::Utils.format_datetime(@dashboard_configuration.from_datetime)
11 options['createdBefore'] = Api::Utils.format_datetime(DateTime.now)
13 issues_by_assignee = Internal.issues.findIssueAssignees(options)
15 unless issues_by_assignee.empty?
16 users = Internal.users_api.find({'logins', issues_by_assignee.keySet()})
19 users_by_login[u.login()] = u
22 # puts "### " + users_by_login.inspect
24 counter_no_assignee = issues_by_assignee.get(nil)
26 counter_max = issues_by_assignee.values().max unless issues_by_assignee.empty?
27 counter_max = counter_no_assignee if counter_no_assignee > counter_max
29 div_id = "unresolved-issues-per-assignee-widget-#{widget.id.to_s}"
33 <h3><%= message('widget.reviews_per_developer.name') -%></h3>
35 <% if issues_by_assignee.size ==0 %>
36 <span class="empty_widget"><%= message('issue_filter.no_issues') -%></span>
39 <div id="<%= div_id -%>">
41 <table class="data width100">
50 issues_by_assignee.each do |assignee, count|
53 <tr class="<%= cycle 'even', 'odd', :name => (div_id) -%>">
54 <td class="max-width">
55 <%= link_to users_by_login[assignee].name(), url_for_issues(options.merge(:assignees => assignee)) -%>
58 <%= '+' if @dashboard_configuration.selected_period? -%><%= count.to_s -%>
60 <% if counter_max > 0 %>
62 <%= barchart(:width => 100, :percent => (100 * count / counter_max).to_i) %>
67 # And now show the unassigned issues counter
70 <tr class="<%= cycle 'even', 'odd', :name => (div_id) -%>">
71 <td class="max-width">
72 <%= link_to message('widget.reviews_per_developer.not_assigned'), url_for_issues(options.merge(:assigned => 'false')) -%>
75 <%= '+' if @dashboard_configuration.selected_period? -%><%= counter_no_assignee.to_s -%>
77 <% if counter_max > 0 %>
79 <%= barchart(:width => 100, :percent => (100 * counter_no_assignee / counter_max).to_i) %>