-
Notifications
You must be signed in to change notification settings - Fork 0
Exporting Forecast CSVs
Forecast allows users to export CSV files containing information about:
- all team members (the 'team export'); and
- all project allocations (the 'project export').
Of these two, the latter is more useful: the information there is almost a superset of the team export, except for the 'capacity' field, which can be safely assumed to be 40 hours per week.
These reports are used for, e.g., project scheduling and reporting purposes (see e.g. the staffing report in the Hut23 repo).
So far, the only way to obtain this CSV is to navigate to Forecast (in a web browser), click on the 'Export' tab, and manually download the files.
The whatwhat export
command is an effort to automate this procedure.
It downloads project assignments, etc. from Forecast using its (undocumented) API and consolidates this data to generate (essentially) the same CSV file.
(Note that if you haven't installed whatwhat
using dune install
, then you'll have to run instead dune exec -- whatwhat export [ARGS...]
.)
whatwhat export [--output[=OUTPUT]] [OPTION]… [START] [END]
-
--output
or-o
allows you to specify where the CSV file will be saved.- If used as a flag without a value (i.e.
whatwhat export -o
), the default Forecast file name will be used (forecast-project-export-from-START-to-END.csv
) - If the option is entirely absent,
whatwhat
will print to standard output.
- If used as a flag without a value (i.e.
-
START
andEND
are start and end dates of the period for which assignments should be exported.- These default to the three-month period centred on the current month. For example, if today's date was 15 March, then the period from 1 February to 30 April would be exported by default.
- Both of these can optionally be specified as an 8-digit string, which is interpreted as YYYYMMDD. So, for example,
whatwhat export 20220101 20221231
will export all assignments in the year 2022. - To specify only the end date but still use the default start date, specify the start date as an underscore (
_
). - Note that the Forecast export page always exports full weeks, so the start date will be stretched backwards to the nearest Monday, and the end date forwards to the nearest Sunday.
whatwhat export
mimics this behaviour accurately, so you may find that the start/end dates are not exactly what you specified.