openfoodfoundation / openfoodnetwork

Connect suppliers, distributors and consumers to trade local produce.
https://www.openfoodnetwork.org
GNU Affero General Public License v3.0
1.09k stars 708 forks source link

Add search / filter parameters to DFC Enterprise Connector #11333

Open kirstenalarsen opened 11 months ago

kirstenalarsen commented 11 months ago

All Global work to be tracked in Clockify #11242 Discovery Endpoints - including testing, code review etc Aus devs to track in #11242 Task within Macdoch Regen Discovery

Description

Following here

We need to be able to request to READ specific results from the DFC Enterprise Connector so that we are not getting all the OFN Enterprises each time we use it, but just the ones we need. Suggested parameters include:

Not Yet - TBC

Please add suggested parameters in Sheet 'Enterprise Search/Filter Parameters] here or comment below and I'll update list above

@mkllnk needs to check-in with DFC / @RaggedStaff about DFC proposed approach to this as is not currently clear

Acceptance Criteria & Tests

mkllnk commented 10 months ago

I discussed this with @RaggedStaff and @lecoqlibre. The main points were:

So... in the absence of a standard, we can just do what we want, right? The easiest would be to use the same techniques as in our other APIs. There we use ransack query parameters to filter on database level. The parameter names and values would be OFN-specific and represent our database models.

mkllnk commented 8 months ago

@rioug We simplified our first version of the discovery portal and won't need this feature at the moment. Maybe later.

rioug commented 8 months ago

I didn't really have time to look at this so no time lost here.

kirstenalarsen commented 8 months ago

@rioug I have moved this back into 'in scope' but just the next checkbox at this point - can you give me an estimate on allowing search by geography i.e. postcode, state/region, country?

kirstenalarsen commented 8 months ago

rough estimate: 2-3 days to implement ransack search and these three string parameters