Project

General

Profile

Actions

Feature #2749

closed

xmera Omnia - Collection #2147: Allow further calculations for issues

Add an average function ignoring nil values

Added by liaham 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
12/17/2024
Due date:
12/17/2024
% Done:

100%

Estimated time:
Compatible Redmine Version:
5.1.z

Description

The average function should ignore nil values in two ways:

  1. nil values should not count in the sum, i.e., use values.compact before summing up
  2. the size should depend on values.compact.size

Names for this kind of average could be

  • compact_average
  • average_without_nil
  • filtered_average
  • net_average
  • null_filtered_average
  • net_of_nil_average
  • average_net_of_nil
  • average_net_of_unset
  • average_without_unset
Actions

Also available in: Atom PDF