Function | Parameters | Return Value | Description |
---|
aggregate_periods(parent_res_id, start_period, end_period) | parent_res_id: Resource start_period: Days since 01.01.1970 end_period: Days since 01.01.1970 |
| Aggregate the periods of the parent_res_id in the given timeframe up across all parent resources |
aggregate_periods_from_start_to_end(res_id) | res_id: Resource |
| Aggregate all periods of the resource based on their Start period and End period |
any_child_resource_has_workday(resource_id, period) | resource_id: Resource period: Days since 01.01.1970 | True if the given period is a workday for any child resource, False if it is not. | Check whether a given date is a workday for any child resource of a department |
delete_obsolete_periods(res_id) | res_id: Resource |
| Delete all period records outside the Start period and End period |
get_amount_of_children(parent_res_id) | parent_res_id: Resource | Amount of child resources |
|
get_start_end_period_from_db(res_id) | res_id: Resource | Start and end period as a tuple | Fetch the start and end period of a resource from the database |
reset_summarized_periods(res_id) | res_id: Resource |
| Sets all aggregated data items in the period table to 0 |