Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Track-280] 30-60-90 Report Update work/milestone filters and formatting #2491

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions epictrack-api/src/api/models/event_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class EventTypeEnum(enum.Enum):
# pylint: disable=C0103
ADM = 16
CEAO_DECISION = 15
COMMENT_PERIOD = 22
EAC_MINISTER = 13
MINISTER_DECISION = 14
REFERRAL = 5
TIME_LIMIT_RESUMPTION = 38
Expand Down
8 changes: 4 additions & 4 deletions epictrack-api/src/api/reports/report_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ class ReportFactory(ABC):

def __init__(
self,
color_intensity=None,
data_keys=None,
filters=None,
group_by=None,
group_sort_order=None,
item_sort_key=None,
template_name=None,
filters=None,
color_intensity=None
template_name=None
):
"""Constructor"""
self.data_keys = data_keys
Expand Down Expand Up @@ -62,7 +62,7 @@ def _format_data(self, data, report_title=None):
else:
for item in data:
obj = {
k: getattr(item, k) for k in self.data_keys if k not in excluded_items
k: getattr(item, k, None) for k in self.data_keys if k not in excluded_items
}
if self.group_by:
formatted_data[obj.get(self.group_by, -1)].append(obj)
Expand Down
6 changes: 3 additions & 3 deletions epictrack-api/src/api/reports/resource_forecast_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ def __init__(self, filters, color_intensity):
]
group_by = "work_id"
super().__init__(
color_intensity=color_intensity,
data_keys=data_keys,
group_by=group_by,
template_name=None,
filters=filters,
color_intensity=color_intensity
group_by=group_by,
template_name=None
)
self.excluded_items = []
if self.filters and "exclude" in self.filters:
Expand Down
Loading