Class: DailyWipByBlockedStalledChart
- Inherits:
-
DailyWipChart
- Object
- ChartBase
- DailyWipChart
- DailyWipByBlockedStalledChart
- Defined in:
- lib/jirametrics/daily_wip_by_blocked_stalled_chart.rb
Instance Attribute Summary
Attributes inherited from DailyWipChart
Attributes inherited from ChartBase
#aggregated_project, #all_boards, #atlassian_document_format, #board_id, #canvas_height, #canvas_width, #data_quality, #date_range, #file_system, #holiday_dates, #issues, #settings, #time_range, #timezone_offset
Instance Method Summary collapse
- #default_description_text ⇒ Object
- #default_grouping_rules(issue:, rules:) ⇒ Object
- #default_header_text ⇒ Object
Methods inherited from DailyWipChart
#add_trend_line, #configure_rule, #group_issues_by_active_dates, #grouping_rules, #initialize, #make_data_set, #run, #select_possible_rules, #trend_line_data_set
Methods inherited from ChartBase
#aggregated_project?, #canvas, #canvas_responsive?, #chart_format, #collapsible_issues_panel, #color_block, #color_for, #completed_issues_in_range, #current_board, #daily_chart_dataset, #describe_non_working_days, #description_text, #format_integer, #format_status, #header_text, #holidays, #html_directory, #icon_span, #initialize, #label_days, #label_issues, #link_to_issue, #next_id, #random_color, #render, #render_top_text, #status_category_color, #working_days_annotation, #wrap_and_render
Constructor Details
This class inherits a constructor from DailyWipChart
Instance Method Details
#default_description_text ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/jirametrics/daily_wip_by_blocked_stalled_chart.rb', line 10 def default_description_text <<-HTML <div class="p"> This chart highlights work that is #{color_block '--blocked-color'} blocked, #{color_block '--stalled-color'} stalled, or #{color_block '--wip-chart-active-color'} active on each given day. <ul> <li>#{color_block '--blocked-color'} Blocked could mean that the item has been flagged or it's in a status that is configured as blocked, or it could have a link showing that it is blocked by another item. It all depends how the report has been configured.</li> <li>#{color_block '--stalled-color'} Stalled indicates that there has been no activity on this item in five days.</li> </ul> </div> <div class="p"> Note that if an item tracks as both blocked and stalled, it will only show up in the blocked totals. It will not be double counted. </div> <% if @has_completed_but_not_started %> <div class="p"> #{color_block '--wip-chart-completed-but-not-started-color'} "Completed but not started" reflects the fact that while we know that it completed that day, we were unable to determine when it had started; it had moved directly from a To Do status to a Done status. The #{color_block '--body-background'} shading at the top shows when they might have been active. Note that the this grouping is approximate as we just don't know for sure. </div> <% end %> #{describe_non_working_days} HTML end |
#default_grouping_rules(issue:, rules:) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/jirametrics/daily_wip_by_blocked_stalled_chart.rb', line 41 def default_grouping_rules issue:, rules: started, stopped = issue.board.cycletime.started_stopped_times(issue) stopped_date = stopped&.to_date date = rules.current_date change = issue.blocked_stalled_by_date(date_range: date..date, chart_end_time: time_range.end)[date] stopped_today = stopped_date == rules.current_date if stopped_today && started.nil? @has_completed_but_not_started = true rules.label = 'Completed but not started' rules.color = '--wip-chart-completed-but-not-started-color' rules.group_priority = -1 elsif stopped_today rules.label = 'Completed' rules.color = '--wip-chart-completed-color' rules.group_priority = -2 elsif started.nil? rules.label = 'Start date unknown' rules.color = '--body-background' rules.group_priority = 4 elsif change&.blocked? rules.label = 'Blocked' rules.color = '--blocked-color' rules.group_priority = 1 rules.issue_hint = "(#{change.reasons})" elsif change&.stalled? rules.label = 'Stalled' rules.color = '--stalled-color' rules.group_priority = 2 rules.issue_hint = "(#{change.reasons})" else rules.label = 'Active' rules.color = '--wip-chart-active-color' rules.group_priority = 3 end end |
#default_header_text ⇒ Object
6 7 8 |
# File 'lib/jirametrics/daily_wip_by_blocked_stalled_chart.rb', line 6 def default_header_text 'Daily WIP, grouped by Blocked and Stalled statuses' end |