Upcoming reports improvements

Dear instance managers,

Our reports will soon have a major improvement. This comes out of a contribution from Sebastian Castro.

Sebastian Castro is a well known developer in the French open source community. He is for example the maintainer of an awesome map tool called Gogocarto. He is also a small-scale farmer and helps hubs running on OFN France :slight_smile: And no he is not available for hire :sob:

His proposal was very much inline with the improvements we already wanted to do on our reports, and the code quality is brilliant. For example he did a lot of technical improvements that will enable us to maintain reports more easily, but also make them evolve in an easier / quicker way.

Therefore the delivery team decided to help him release this big piece of work.

Indeed, if the delivery team would have done this work, we would have done it incrementally, reports by reports. Small bits by small bits. Hence this message to you: now that we are soon ready to ship these improvements we will need your help to communicate this to users in advance and help them handle the new features and potential breaking changes.

Everything should be ready to release on May 24th, but we will confirm this date by the end of the week.

Once the date is confirmed, we suggest you communicate to all users the changes are upcoming + ask them to reach your support team to explain if they are doing scripts / macros / fancy Excel formula with the reports and if so which ones. Indeed, we noticed we don’t know how many instances are running scripts on reports, therefore it is very difficult for us to plan any breaking changes.

Therefore we have put together the following strategy: this release should NOT break anything in the csv format of the reports ( but there are a couple of changes you need to be aware of, see below).

What type of changes are we talking about?

1. Several options for downloading reports (alongside on screen display)

ALL reports will now have PDF, Spreadsheet, CSV & JSON available for download.


2. Print option

All reports can now be printed easily.

3. Rendering options

You will be able to hide columns before downloading or reading online.


You will be able to choose if you want a header row or total / summary row displayed on the report

  • Spreadsheet versions should display prices as prices (no changes in CSV).

4. UI Uplift

All reports will have two sections: filters and rendering options

5. New kid on the block

Packing reports can be viewed by customer or producer. Now they also come by product.

6. Content changes

:warning: Changes that could harm scripts :warning:

  • Spreadsheet are the human readable version and CSV the machine readable version. So in CSV “No” is changed to “false”

  • In order cycle management report “code” heading was renamed “customer code”. Note that this does not apply if you have translated it in another way.

  • Orders suppliers total now also have total rows, but you can unselect the option

  • Download file names have changed

  • The two last columns of Order Cycle Supplier Totals are removed (they were absolutely useless)

  • Column “to hub” in OC suppliers totals by distributors is renamed “hub” - again unless you have translated it otherwise

Other changes:

  • Packing reports: Price and phone are added (but hidden by default)

  • The Xero reports code was selecting default data. This is now shown on the UI and the user can change them.

What will come next

These improvements will either be done by Sebastian or made available through papercuts:

  • Merging of reports types which are very close in terms of columns (ex tax reports or delivery reports)

  • Improve UX of Show/hide columns

  • Ability for the admin to save their rendering options per reports

and probably more :wink:

Please don’t hesitate if you have questions!

ping @instance_managers @delivery


This is such an impressive post @Rachel. Thanks for all the detail!!

1 Like

Wonderful work, and bows to Sebastian for the amazing work as well as to @Rachel for such clarity and such comprehensive yet succinct information!!! :pray:

Aaaah one important thing I have forgotten: this work buts all reports data on the API (JSON format).

However this is the V0 of the API. As explained by Lynne here. API v0 is unsupported. It’s okay-ish if instance managers are maintaining scripts that read this API. But don’t advertise this too much to users, as we won’t treat any bugs on this version of the API.

@lin_d_hop @lauriewayne1 Sebastian is also the one to celebrate for the summary. He did most of the job in his PR introduction.


There is no doubt Sebastian is a hero among us :slight_smile:

This is very very ace - thank you Sebastian!

Is it correct that the V0 API documentation will NOT include this as doesn’t automatically update? How / where might I be able to see how to use the reports from API?

@instance_managers May 24th is the correct date we will release this.

You can have a look at what it looks like here: https://staging.openfoodnetwork.org.au/

Note that you can see weird things due to corrupt data on staging - I suggest you create yourself your own account over there.

Remember: CSV exports are almost identical to what users have currently (see list of changes above). So if you have s2 bugs on any other format, don’t stress out, just ask users to keep using CSV for a while.

@Kirsten I have no idea about documentation, sorry. Best to ask Maikel perhaps.

Correct, it’s not documented. I would need to look into dev tools while running a report to see all the parameters. There are more standardised now. We could do our own documentation but it’s a bit of work. They are available under /api/v0/reports/REPORT_TYPE/REPORT_SUBTYPE?OPTIONS and it’s feature toggled. Toggle name api_reports.

1 Like

I’m closing here as this is now in production :+1: :