0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Add date range filters to workflow reports

This commit is contained in:
Matt Westcott 2020-04-17 18:11:40 +01:00 committed by Matt Westcott
parent 3cb8b90a0d
commit bcbf6f0366

View File

@ -98,14 +98,17 @@ class LockedPagesReportFilterSet(WagtailFilterSet):
class WorkflowReportFilterSet(WagtailFilterSet):
created_at = django_filters.DateFromToRangeFilter(label='Started at', widget=DateRangePickerWidget)
class Meta:
model = WorkflowState
fields = ['workflow', 'status']
fields = ['workflow', 'status', 'created_at']
class WorkflowTasksReportFilterSet(WagtailFilterSet):
created_at = django_filters.DateFromToRangeFilter(label='Started at', widget=DateRangePickerWidget)
finished_at = django_filters.DateFromToRangeFilter(label='Completed at', widget=DateRangePickerWidget)
class Meta:
model = TaskState
fields = ['task', 'status']
fields = ['task', 'status', 'created_at', 'finished_at']